[GRASS-dev] Re: [GRASS-user] Character encoding problem

[CC to grass-dev]

Jana Krajcovicova wrote:

It is still desirable to change the character encoding directly in the .dbf
file after import.
Reason is that setting truetype and character encoding using
d.font.freetype only affects display commands, but reading database (e.g.,
using db.select) is still scrambled.

Maybe there is an environmental variable in GRASS which can be used to
change the default UTF8 encoding? But I would say that it is better to use
OpenOffice to change .dbf file encoding in single cases.

There is a GRASS variable, GRASS_DB_ENCODING. However, it appears that
only the form library (used to display attribute information via
Tcl/Tk) actually uses this variable.

Modules which read text from databases and pass the text to the
R_text() should use R_encoding() to set the encoding accordingly. GUI
code should do something similar (the wx GUI reads this from
os.environ, although it's actually a GRASS variable).

--
Glynn Clements <glynn@gclements.plus.com>