[crossfire] Using UTF-8 in maps

Raphaël Quinet raphael at gimp.org
Fri Jul 25 01:51:29 CDT 2008


On Thu, 24 Jul 2008 20:44:02 -0700, Mark Wedel <mwedel at sonic.net> wrote:
>   What would be good to help out on this is basic directions in the editor as 
> needed to embed the UTF8 characters.  Same for some of the more popular editors 
> so users now how to enter them.

Nowadays, most Linux systems are configured to use UTF-8 by default so
most users will not have to change anything from their setup.  This is
usually done by setting the environment variable LANG to "en_US.UTF-8"
(or something else than en_US depending on your language).  This can
also be done with the LC_* variables such as LC_CTYPE.  A few systems
are still configured with the old "C" locale or "en_US" without UTF-8
but most distros now default to "en_US.UTF-8". Use the command "locale"
to check how your system is configured.  If the locale is configured
correctly, then most editors will save the right UTF-8 byte sequences
to the file after the user has entered or copied some non-ASCII
characters.

We should probably write something similar to this section of the GIMP
developers FAQ:  http://developer.gimp.org/faq.html#id2467550

The examples given in that FAQ explain how to configure emacs or vi for:
- setting the default code indentation style to the "GNU style" (a different
  style is used for crossfire and it doesn't match any of the predefined
  ones, so that would need some tweaking).
- setting the default coding system to UTF-8
- setting the name and e-mail address used when a ChangeLog entry is added
  automatically (with M-X add-change-log-entry in emacs or with the
  function NewChangelogEntry in vim)

>   And lastly, we probably need to update the documentation that UTF8 is the 
> proper codes to use, and the maps updated.  For documentation, those hints on 
> how to enter those characters would be useful.

Right.  UTF-8 will be mostly useful for those like me who want to use
accented characters to write their name correcly.  It is likely that
those users have a keyboard with keys for entering these accented
characters directly, or they know other ways to enter them anyway.
Others who want to write a few accented characters can copy them from
the character map (Linux or Windows) or from a character picker
applet (Linux).

I think that the usage of UTF-8 in the source code and in the maps
should be limited to the accented characters that we really need.
Even if UTF-8 supports it, I don't think that we should start
entering strings in runic alphabet, hieroglyphs or linear-B because
it is likely that most users will not have the right fonts to
display these strange characters.  So let's keep it simple.  Besides,
if we want to write strange text in maps, we already have the media
tag [strange] for that.

-Raphaël



More information about the crossfire mailing list