As far as I could tell, everything was working well. In Ubuntu, looking
at an ISO8859-1 encoded file with less when LANG=fr_FR.UTF-8 gives <E9>
signs instead of e acute, whereas looking at an UTF-8 encoded file shows
the e acute. So I could check that the iconv step had done what was
expected.
After putting the .cat files in /usr/dt/lib/nls/fr_FR.UTF-8 and setting
LANG=fr_FR.UTF8 in .dtprofile,
I checked that I had LANG=fr_FR.UTF-8 in the dtterm
window, and that I could enter non-ASCII characters such as the Euro
sign, accented characters, oe with ligature. There were no strange signs
in the place of accented letters in the menus of dtterm.
I checked that this was also the case in dtpad, dtfile, dtmail.
I did not have to change anything to the fonts, which is indeed a bit
surprising. Maybe because
the accented characters of French language language fit into ISO8859-1,
Motif applications can
display them using an ISO8859-1 font, even when they are UTF-8 encoded.
I will try to display
Japanese or Chinese characters in dtterm.
So, did everything work pretty well after this conversion? What about
fonts/font.aliases? I would think those would need to be changed to use
iso10646 fonts, right?
-jon
On 07/01/2018 02:34 AM, Edmond Orignac wrote:
To convert an existing ISO8859-1 message catalogue to UTF-8, the
procedure (using fr_FR as example) is as follows.
1) create a directory fr_FR.UTF-8 and the subdirectories
app-defaults backdrops config dtsr msg palettes types
2) copy the messages in ISO-8859-1 under the fr_FR.UTF8/msg directory
cp /[path]/cde/programs/localized/msg/fr_FR.ISO8859-1/*.msg
fr_FR.UTF8/msg
3) in fr_FR.UTF8 run the script:
#!/bin/sh
for i in *.msg; do
iconv -f ISO_8859-1 -t UTF-8 $i > utf8temp
mv utf8temp $i
done
to convert to UTF-8 encoding
4) Create the cat files with the script
#!/bin/sh
# generates .cat files from a set of .msg files
for i in *.msg; do
LANG=fr_FR.UTF-8 gencat -o `basename $i .msg`.cat $i;
# echo `basename $i .msg`.cat $i;
done
Here gencat is the one that comes with GNU C library. It is X/OPEN
compatible.
5) mkdir /usr/dt/lib/nls/msg/fr_FR.UTF8
sudo cp *.cat usr/dt/lib/nls/msg/fr_FR.UTF8
6) edit .dtprofile, adding LANG=fr_FR.UTF-8
dtterm, dtpad, dtfile, dtmail display the messages correctly. App
defaults palettes or backgrounds are missing,
and the messages remain in English.
Converting the *.tmsg files is done with
cde/programs/localized/util/merge
For app-defaults, we do the following:
1)
#!/bin/sh
for i in *.tmsg; do
iconv -f ISO_8859-1 -t UTF-8 $i > utf8temp
mv utf8temp $i
done
2)
!/bin/sh
# generates .cat files from a set of .msg files
for i in *.tmsg; do
LANG=fr_FR.UTF-8 /[path]/cde/programs/localized/util/merge <
`basename $i .tmsg`.nls $i> `basename $i .tmsg`;
done
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel