[fpc-pascal] string comparison with strcomp

Marc Santhoff M.Santhoff at t-online.de
Sat Apr 9 21:29:40 CEST 2005


Hi,

I'm stuck with some sort of nasty problem:

While doing internationalization in a program planned only for german
users I started to use the gettext mechanism to translate any
descriptive GUI string. The mean part is that my original strings (now
used as resourcestrings) do not work if they have german umlauts or the
like in it. I want to avoid having to put anything to us-ascii first to
get it done.

>From looking at the sources of gettext.pp i know the comparison is done
with "StrComp", but this is where I'm stuck. If i use e.g. 'ΓΌ' it is
represented as \374 (it is $FC) as in:

#: state1:srdataswap
msgid " - Daten\374bertragung"
msgstr "anything, testing only"

in the .po file. But in translation the msgid is not found (testing with
fr_FR as $LANG), but this here:

#: conststr:srokay
msgid "OK"
msgstr "Oui"

does work. In the .mo file the hex value is $FC as expected (in a hex
viewer with french LANG var).

Can someone explain to me what's wrong here and maybe how to get around
it?

TIA,
Marc






More information about the fpc-pascal mailing list