On Wed, 26 May 2004, Karl Ove Hufthammer wrote:

> "Mark K. Kim" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
> > I wish you could get the list of languages and their charsets
> > from the OS but there's no cross-platform way to do this as
> > far as I know.  Also, a single language can support multiple
> > charsets and average user doesn't know about charsets so it
> > might confuse them to list multiple entries of one language in
> > the config program.
>
> What's this charset stuff you speak of? How is it used in
> Tux Paint?

Hi Karl!

Are you just joking or really asking?  =P

Simply put, character sets (or "charsets") are used for displaying
different languages.  For example, ASCII #173 may not necessarily be "{"
on all computer systems.  If you put a text document with "{" onto a
floppy, and insert it into a Danish computer and look at it, it looks like
the "ae" character.  This is obviously a problem for a program like Tux
Paint that works with multiple languages.  I understand currently Tux
Paint supports 40+ languages...

Tux Paint's handling of character sets is pretty simple.  It uses the
standard latin character set (ISO-8859-1, I guess) or UTF-8 (one of the
Unicode representations supported on all OS of interest.)  For most
European langauges, the standard ISO-8859-1 is sufficient.  But for
others, the UTF-8 unicode is used instead.  The rest is handled by SDL_ttf
(the TTF text display library) and gettext (the text translation library)
for translating all the complex languages back-and-forth between the input
language, ISO-8859-1, and UTF-8.

Unfortunately we can't use UTF-8 for everything because the font library
we're using wants a separate font file for each character set.  For the
most part just forcing ISO-8859-1 on the font library just works for most
European languages, hence the reason we don't deal with all the
different European charsets.

I hope that helps.

-Mark

-- 
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
_______________________________________________
Tuxpaint-dev mailing list
[EMAIL PROTECTED]
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to