[GRASS-dev] Re: [GRASS-SVN] r46343 - grass/trunk/lib/python

Markus Neteler neteler at osgeo.org
Fri Jul 22 04:10:06 EDT 2011


On Mon, Jul 4, 2011 at 10:50 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Martin Landa wrote:
>
>> > Author: glynn
>> > Date: 2011-05-21 06:51:24 -0700 (Sat, 21 May 2011)
>> > New Revision: 46343
>> >
>> > Modified:
>> >   grass/trunk/lib/python/core.py
>> > Log:
>> > Don't try to decode process output
>>
>> can you elaborate a bit? Thanks in advance.
>
> The output from and input to GRASS commands consists of bytes, not
> characters.
>
> Decoding (and subsequent re-encoding) creates a risk of (pointless)
> conversion failures if commands produce output which isn't compatible
> with the locale's encoding (which is quite possible; with a few
> exceptions, GRASS libraries and modules deal with bytes, not
> characters).
>
> If wxGUI wants (unicode) character strings, wxGUI should perform the
> decoding. In general, if the data is being passed to wxWidgets, it
> should be decoded. If it's being passed to a command or written to a
> file, the raw byte sequences should normally be passed through
> untouched.

AFAIK this is not yet backported, should it be?

Markus


More information about the grass-dev mailing list