[fpc-pascal] string comparison with strcomp
john at jcoppens.com
Sun Apr 10 00:05:58 CEST 2005
I reported this a long time ago, and got an answer like: gettext doesn't
accept source strings in UTF-8.
The easiest way to solve it is to write the program in English (with
english on buttons, etc) and then write a po file for german. I know, I
know, not elegant or easy, but it works. Note that the strings must be
edited with a UTF-8 editor.
On Sat, 09 Apr 2005 21:29:40 +0200
Marc Santhoff <M.Santhoff at t-online.de> wrote:
> 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
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal