in reply to Re^8: Another utf-8 decoding problem
in thread Another utf-8 decoding problem

Sorry, meant

SV = PV(0x9cf0060) at 0x9fbde50 REFCNT = 1 FLAGS = (TEMP,POK,pPOK) PV = 0x9fa6988 "Tr?ningsredskap"\0 CUR = 15 LEN = 16 SV = PV(0x9cefdd0) at 0x87c2800 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x9f9b490 "Tr\303\244ningsredskap"\0 [UTF8 "Tr\x{e4}ningsredska +p"] CUR = 16 LEN = 20 SV = PV(0x9cefdd0) at 0x87c2800 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x9f7ca38 "Tr\357\277\275ningsredskap"\0 [UTF8 "Tr\x{fffd}nings +redskap"] CUR = 17 LEN = 20 SV = PV(0x9cf0060) at 0x9fbde50 REFCNT = 1 FLAGS = (TEMP,POK,pPOK) PV = 0x9f6b8c8 "Tr?ningsredskap"\0 CUR = 15 LEN = 16

Replies are listed 'Best First'.
Re^10: Another utf-8 decoding problem
by moritz (Cardinal) on Oct 11, 2010 at 14:53 UTC
    SV = PV(0x9cf0060) at 0x9fbde50 REFCNT = 1 FLAGS = (TEMP,POK,pPOK) PV = 0x9fa6988 "Tr?ningsredskap"\0 CUR = 15 LEN = 16

    This looks like Latin-1

    SV = PV(0x9cefdd0) at 0x87c2800 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x9f9b490 "Tr\303\244ningsredskap"\0 [UTF8 "Tr\x{e4}ningsredska +p"] CUR = 16 LEN = 20

    A proper string in Perl's internal format. Should be fine to print out if you add that IO layer, or put it through Encode::encode.

    SV = PV(0x9cefdd0) at 0x87c2800 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x9f7ca38 "Tr\357\277\275ningsredskap"\0 [UTF8 "Tr\x{fffd}nings +redskap"] CUR = 17 LEN = 20

    This is wrong. It means you decoded something the wrong character encoding.

    Perl 6 - links to (nearly) everything that is Perl 6.
      "A proper string in Perl's internal format. Should be fine to print out if you add that IO layer, or put it through Encode::encode. " - Even if the browser environment is iso-8859-1? :-)
        Even if the browser environment is iso-8859-1?

        If you encode to ISO-8859-1, or set up your IO layer as ":encoding(ISO-8859-1)", sure.

        Note that I originally asked for the encoding of your terminal, but if this is a CGI script, the "charset" mentioned in the HTTP header counts.

        Perl 6 - links to (nearly) everything that is Perl 6.