in reply to encoding question
However, what is important is how the "'A with circumflex" is encoded in the source code, and what Perl thinks the encoding is.
To avoid problems, I always try to not have any characters with code points over 127 in my source code, and specially avoid the code points 128-255. If I were to write the line, I would write it as:
that should work regardless whether perl thinks my source code is in UTF-8 format or not. (It may still get confused if it thinks my source code is written in EBCDIC, but that's no worry for me).my $str = "Th\x{92}t \x{92}pple";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: encoding question
by Krambambuli (Curate) on May 20, 2010 at 08:56 UTC | |
by moritz (Cardinal) on May 20, 2010 at 09:00 UTC | |
by JavaFan (Canon) on May 20, 2010 at 13:38 UTC | |
|
Re^2: encoding question
by ikegami (Patriarch) on May 21, 2010 at 04:21 UTC | |
by 7stud (Deacon) on May 23, 2010 at 04:17 UTC | |
|
Re^2: encoding question
by choroba (Cardinal) on May 20, 2010 at 08:34 UTC |