2012-07-09 10:47:48 +00:00
|
|
|
The file Locale.aliases is used to map common language specifications to
|
|
|
|
old-style long names.
|
|
|
|
|
|
|
|
The file Locale.canonical is used to map old style names and three letter
|
2020-03-06 09:19:54 +00:00
|
|
|
ISO-639-2 names to the preferred two letter ISO-639-1 names.
|
2002-04-07 18:56:08 +00:00
|
|
|
|
2006-07-07 11:16:49 +00:00
|
|
|
Language files which contain non-ascii characters should either be properly
|
|
|
|
marked unicode files (UTF-8 with a leading Byte Order Mark or UTF-16 with a
|
|
|
|
leading Byte Order Mark) or should encode those characters as \u escape
|
|
|
|
sequences so that they are usable on systems where the default C-String
|
|
|
|
encoding is not the same as the one on which the language files were created!
|
2002-04-07 18:56:08 +00:00
|
|
|
|
|
|
|
Since it is generally not easy to edit unicode directly, or enter the
|
|
|
|
correct unicode escape sequences, it is recommended that you use the
|
|
|
|
cvtenc tool to perform conversions of the files before and after editing
|
|
|
|
in the default encoding used by your system.
|
|
|
|
|
|
|
|
For example, to edit the French language file so that it contains an ascii
|
2006-07-07 11:16:49 +00:00
|
|
|
propertly list with \u escape sequeneces, you could do -
|
2002-04-07 18:56:08 +00:00
|
|
|
|
2012-07-09 10:47:48 +00:00
|
|
|
cvtenc -EscapeIn yes fr > tmpfile
|
2002-04-07 18:56:08 +00:00
|
|
|
vi tmpfile
|
2012-07-09 10:47:48 +00:00
|
|
|
cvtenc -EscapeOut yes tmpfile > fr
|
2002-04-07 18:56:08 +00:00
|
|
|
rm tmpfile
|
|
|
|
|
2006-07-07 11:16:49 +00:00
|
|
|
A common case is where you have a file in UTF-8, but the Byte Order Mark is
|
|
|
|
missing, so you need to fix it up ...
|
|
|
|
|
|
|
|
cvtenc -Encoding 'UNICODE UTF-8' FileWithMissingBOM >tmpFile
|
2012-07-09 10:47:48 +00:00
|
|
|
cvtenc -EscapeOut yes tmpFile > fr
|
2006-07-07 11:16:49 +00:00
|
|
|
|