<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40028 >
Jason Short wrote: # ... I thought I had written this up somewhere in the code, but I can find # nothing. Where should it be documented? Documenting the code and README.* files. Committed trunk revision 14330. Committed S2_2 revision 14331. Committed S2_1 revision 14332.
Index: utility/shared.c =================================================================== --- utility/shared.c (revision 14329) +++ utility/shared.c (working copy) @@ -1223,6 +1223,9 @@ } } +/*************************************************************************** + Language environmental variable. +***************************************************************************/ char *get_langname(void) { char *langname = NULL; Index: utility/fciconv.c =================================================================== --- utility/fciconv.c (revision 14329) +++ utility/fciconv.c (working copy) @@ -42,6 +42,19 @@ static bool is_init = FALSE; static char convert_buffer[4096]; +/* + See PR#40028 for additional explanation. + + The data_encoding is used in all data files and network transactions. + This is UTF-8. Currently, the rulesets are in latin1 (ISO-8859-1). + + The internal_encoding is used internally within freeciv. This is always + UTF-8 at the server, but can be configured by the GUI client. (When your + charset is the same as your GUI library, GUI writing is easier.) + + The local_encoding is the one supported on the command line. This is not + under our control, and all output to the command line must be converted. +*/ #ifdef HAVE_ICONV static const char *local_encoding, *data_encoding, *internal_encoding; static const char *transliteration_string; Index: doc/README =================================================================== --- doc/README (revision 14329) +++ doc/README (working copy) @@ -394,7 +394,16 @@ (You could do this in your .profile or .login file.) +Sometimes there is a conflict between the local library implementation +and the internal locale determination. It is often possible to work +around problems with a more detailed descriptor: + LANG=de_DE.UTF-8 + +We'd like to know about such problems. Please report them as bugs +(see BUGS). + + Log messages: ============= Index: doc/README.rulesets =================================================================== --- doc/README.rulesets (revision 14329) +++ doc/README.rulesets (working copy) @@ -75,6 +75,10 @@ Properties of units and advances are now fairly well generalised. Properties of buildings are still rather inflexible. +(See utility/fciconv.[ch]) +The data charset is used in all data files and network transactions. +This is UTF-8. Currently, the rulesets are in latin1 (ISO-8859-1). + ---------------------------------------------------------------------- Restrictions and Limitations: ----------------------------- Index: doc/HACKING =================================================================== --- doc/HACKING (revision 14329) +++ doc/HACKING (working copy) @@ -1049,4 +1049,15 @@ ...) messages should be translated. The other loglevels (LOG_FATAL, LOG_ERROR,LOG_VERBOSE, LOG_DEBUG) should NOT be translated. +(See utility/fciconv.[ch]) +The data_encoding is used in all data files and network transactions. +This is UTF-8. Currently, the rulesets are in latin1 (ISO-8859-1). + +The internal_encoding is used internally within freeciv. This is always +UTF-8 at the server, but can be configured by the GUI client. (When your +charset is the same as your GUI library, GUI writing is easier.) + +The local_encoding is the one supported on the command line. This is not +under our control, and all output to the command line must be converted. + =========================================================================== Index: doc/README.nations =================================================================== --- doc/README.nations (revision 14329) +++ doc/README.nations (working copy) @@ -63,6 +63,9 @@ Here is yet another list of nations files; again add your nation (data/nation/<nationname>.ruleset) to it. +(See utility/fciconv.[ch]) +The data charset is used in all data files and network transactions. +This is UTF-8. Currently, the rulesets are in latin1 (ISO-8859-1). ----------------------------------------------------------------------
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev