[GRASS-dev] [GRASS GIS] #2021: encoding information in locale gets lost
GRASS GIS
trac at osgeo.org
Fri Jul 26 07:39:53 PDT 2013
#2021: encoding information in locale gets lost
-----------------------------+----------------------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Keywords: locale encoding | Platform: Linux
Cpu: Unspecified |
-----------------------------+----------------------------------------------
Comment(by mlennert):
Replying to [ticket:2021 mlennert]:
> My locale settings before launching GRASS 7:
>
>
> {{{
> $ locale
> LANG=fr_BE.UTF-8
> LANGUAGE=fr_BE:fr
> LC_CTYPE="fr_BE.UTF-8"
> LC_NUMERIC="fr_BE.UTF-8"
> LC_TIME="fr_BE.UTF-8"
> LC_COLLATE="fr_BE.UTF-8"
> LC_MONETARY="fr_BE.UTF-8"
> LC_MESSAGES="fr_BE.UTF-8"
> LC_PAPER="fr_BE.UTF-8"
> LC_NAME="fr_BE.UTF-8"
> LC_ADDRESS="fr_BE.UTF-8"
> LC_TELEPHONE="fr_BE.UTF-8"
> LC_MEASUREMENT="fr_BE.UTF-8"
> LC_IDENTIFICATION="fr_BE.UTF-8"
> LC_ALL=
> }}}
>
>
> locale settings after launching GRASS 7:
>
>
> {{{
> > locale
> LANG=fr_BE
> LANGUAGE=fr_BE
> LC_CTYPE=fr_BE
> LC_NUMERIC=C
> LC_TIME=fr_BE
> LC_COLLATE=fr_BE
> LC_MONETARY=fr_BE
> LC_MESSAGES=fr_BE
> LC_PAPER=fr_BE
> LC_NAME=fr_BE
> LC_ADDRESS=fr_BE
> LC_TELEPHONE=fr_BE
> LC_MEASUREMENT=fr_BE
> LC_IDENTIFICATION=fr_BE
> LC_ALL=
> }}}
>
>
> Thus the special characters in translated messages are not displayed
correctly.
>
> This is with svn revision 56918.
The culprit seems to be r52517 which includes the following line in
lib/init.grass.py:
{{{
language = language.split('.')[0] # Split off ignored .encoding part if
present
}}}
Why should the encoding part be split off, especially since it is _not_
ignored as implied by the comment. Module messages that have been
translated (in my case into French) and include special characters are not
displayed correctly.
When I comment out this line, I get messages in the correct encoding.
Maris, could you explain the reason for taking away the encoding info ?
I'm tempted to comment out the line for now and see if anyone reports
negative consequences, but I'll wait a few days to see if there is a
reason for it.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2021#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list