bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

i18n of math formulas, esp division symbol.


From: David Bruce
Subject: i18n of math formulas, esp division symbol.
Date: Sun, 23 Jan 2011 16:36:12 -0600

Hi,

I maintain tuxmath, an educational math game for young children.  I am
trying to make the in-game display of math questions more
i18n-friendly, as different locales may display an equation somewhat
differently.  So, I have created an array of format strings for the
various types of questions, e.g.:

N_("%d + %d = ?"),
N_("%d x %d = ?"),

and so forth.  So far so good.  The problem is that the division
symbol conventionally used in US lower schools (ASCII 246) is not in
the lower 127 chars that map directly into UTF-8.  Our program uses
SDL_Pango for graphical text output, which takes UTF-8 input.

I have tried making a format string for division in UTF-8
N_(%d รท %d = ?)

but gettext gives the following error when I try "make dist":

/usr/bin/xgettext: Non-ASCII string at src/mathcards.c:2594.
                   Please specify the source encoding through --from-code.

So, how can I specify this to be UTF-8 in my program's build system?

However, I note in the gettext manual that it is recommended that the
msgid strings always be in ASCII.  I'd really like to stick with UTF-8
as much as possible within the program.  Thanks for any suggestions.

David Bruce



reply via email to

[Prev in Thread] Current Thread [Next in Thread]