Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] RFC: encodings and environment variables
Home

[Freeciv-Dev] RFC: encodings and environment variables

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] RFC: encodings and environment variables
From: Jason Dorje Short <vze49r5w@xxxxxxxxxxx>
Date: Tue, 28 Jan 2003 23:35:23 -0500
Reply-to: jdorje@xxxxxxxxxxxxxxxxxxxxx

As explained earlier, I think freeciv needs to be able to convert between three different types of encoding: the freeciv encoding, the local encoding, and the display encoding.

It should be possible to override all of these by using environment variables. Quite simply, there's no reason _not_ to allow this; it only takes a couple of extra lines. And it will make debugging on unusual systems easier since the user can change the encoding without needing to recompile.

The freeciv encoding should be UTF-8. This encoding is used in internal storage, when sending data over the network (it overrides $FREECIV_NETWORK_ENCODING), in savegames, etc. It should be settable by $FREECIV_DATA_ENCODING (although this should be unnecessary except in exceptional circumstances).

The local encoding can usually be specified to iconv as "". On some systems this doesn't work and "char" will be needed. I can imagine that on some iconv implementations neither will work, and it will have to be manually specified. $FREECIV_LOCAL_ENCODING can be used to override this.

The display encoding depends on the interface being used. For the server and most clients it should be the same as the local encoding. For gui-gtk-2.0 it is UTF-8. For gui-sdl it is UTF-16 (or possibly UTF-16LE or UTF-16BE, as discussed separately). This can be overridden by $FREECIV_DISPLAY_ENCODING.

Anyway, once the *current* patch for PR#1824 is resolved and the client-side-translation issue is addressed (without which this won't do much good), I will start work on this general system.

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] RFC: encodings and environment variables, Jason Dorje Short <=