htoug has asked for the wisdom of the Perl Monks concerning the following question:
The docs also advise that you use utf to minimize any problems with UTF-8 and Perl.
The authors must have been english-speaking!
My language (danish) uses three not-uncommon (in danish that is) letters: æ, ø and å, that in the characterset we normally use (ISO-8859-1) are 8 bits long. In UTF-8 they are 16-bit characters. Any attempt to use them, in eg. a comment, results in syntax errors from perl. Whats more any data that we read from a file, or want to output to a file should be in ISO-8859-1 or it will be gibberish.
The way out has been to avoid use utf; and instead convert from UTF-8 to ISO-8859-1 everywhere data is fetched from XML, preferably by subclassing the XML-modules.
This is clunky, and errorprone.
Presently I sit and wait for Perl6 with line disciplines, and a new version of the operation system, that allows us to switch to UTF-8 (just leaving us with the minor task of converting all our data and files ;-)
Is there a monk out there who has another (preferably better - but I'm not picky) way of doing it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML converts to UTF-8 and causes problems for non-English language speakers
by grantm (Parson) on Jun 19, 2002 at 12:39 UTC | |
|
Re: XML converts to UTF-8 and causes problems for non-English language speakers
by mirod (Canon) on Jun 19, 2002 at 13:20 UTC | |
|
Re: XML converts to UTF-8 and causes problems for non-English language speakers
by BrowserUk (Patriarch) on Jun 19, 2002 at 14:02 UTC | |
by Anonymous Monk on Sep 22, 2018 at 05:59 UTC | |
|
Re: XML converts to UTF-8 and causes problems for non-English language speakers
by Matts (Deacon) on Jun 19, 2002 at 14:57 UTC | |
|
Re: XML converts to UTF-8 and causes problems for non-English language speakers
by demerphq (Chancellor) on Jun 19, 2002 at 11:05 UTC |