in reply to Re: How to reverse a (Unicode) string
in thread How to reverse a (Unicode) string
I don't know what you mean by "unicode encoding" (are there encodings that map to non-unicode chars?), but in the perl context it's worth mentioning that iso-8859-1 strings don't follow unicode-semantics by default, the need to be encoded like any other string:
# this file is stored as latin1 print "ä" =~ m/\w/ ? "Unicode\n" : "Bytes\n"; __END__ Bytes
Perl's unicode support is great, but the programmer MUST learn the difference between unicode and utf-8, and the difference between text data and binary data.
Yes, and they have to learn that for any kind of tool that supports Unicode and different encodings.
And I really like the Perl 6 spec which allows string operations on byte, codepoint and grapheme level ;-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How to reverse a (Unicode) string
by Juerd (Abbot) on Jan 10, 2008 at 00:53 UTC | |
by moritz (Cardinal) on Jan 10, 2008 at 08:33 UTC | |
by Juerd (Abbot) on Jan 10, 2008 at 21:42 UTC | |
by ikegami (Patriarch) on Jan 09, 2011 at 23:52 UTC | |
by JavaFan (Canon) on Jan 10, 2011 at 09:17 UTC | |
by ikegami (Patriarch) on Jan 10, 2011 at 15:50 UTC | |
by JavaFan (Canon) on Jan 10, 2011 at 16:17 UTC | |
by ikegami (Patriarch) on Jan 10, 2011 at 16:15 UTC | |
by JavaFan (Canon) on Jan 10, 2011 at 16:29 UTC | |
|