[GRASS-user] ascii decode special character

Frank David frank.david at geophom.fr
Thu Jan 3 11:21:26 PST 2019


Hi Vero,

I mean that "kilometer" is not a string from my psmap, it's a part of 
scale object "scalebar" in the psmap file :

scalebar s
     where 7.0 9.3
     length 10.0
     units kilometers
     height 0.04
     ...

The translation in french (with accent), when the GUI is set in french, 
is made by Grass.

All my special characters are well printed in my ps file, except the 
scale unit... ;-(

Do you see what I mean ?

Cheers,

Frank


Le 03/01/2019 à 13:40, Veronica Andreo a écrit :
> Hi Frank,
>
> Maybe I do not get what you mean, but changing the encoding for the 
> psmap file and the running ps.map with the newly saved file helped me 
> with special characters in Spanish such as accent and ñ. That's what 
> we use ps.map for, no? Or what do you mean then?
>
> Cheers,
> Vero
>
> El jue., 3 ene. 2019 a las 12:43, Frank David (<frank.david at geophom.fr 
> <mailto:frank.david at geophom.fr>>) escribió:
>
>     Hi Vero,
>
>     Ok for updating.
>
>     Concerning the problem of special character in units (kilometer)
>     scale bar, we already had a post about that, and encoding in
>     ISO-8859-1 does not change anything about that (but solve the
>     problem in text string from user). I think the problem comes from
>     grass code...
>
>     I met the same problem with v.label.
>
>     Cheers,
>
>     Frank
>
>     Le 03/01/2019 à 12:16, Veronica Andreo a écrit :
>>     Hi Frank,
>>
>>     Good that you solved it :)
>>
>>     In any case, I would recommend you to update your grass version.
>>     There have been quite some changes since August last year in
>>     trunk (Dev version).
>>
>>     Moreover, I think the ps.map issue could be solved by saving the
>>     psmap instructions with a different encoding, no need to change
>>     language because of that. Check the last paragraph under Notes in
>>     the manual [0].
>>
>>     HTH,
>>     Vero
>>
>>     [0] https://grass.osgeo.org/grass77/manuals/ps.map.html
>>
>>     El jue., 3 ene. 2019 6:45, Frank David <frank.david at geophom.fr
>>     <mailto:frank.david at geophom.fr>> escribió:
>>
>>         Hi Markus,
>>
>>
>>>         Hi Frank,
>>>
>>>
>>>         Am Mi., 2. Jan. 2019, 16:56 hat Frank David
>>>         <frank.david at geophom.fr <mailto:frank.david at geophom.fr>>
>>>         geschrieben:
>>>
>>>             Hello all,
>>>
>>>             I wish a very nice year to every GRASS user and also for
>>>             GRASS
>>>             developments !
>>>
>>>
>>>         Happy New Year!
>>>
>>>             I met a decoding problem with "v.db.select map=my_vector
>>>             columns=my_name" when GRASS meet some special characters
>>>             in the string
>>>             of my_name field. The string value is "Côte de la Bouchère".
>>>
>>>             See below the error message :
>>>
>>>             Traceback (most recent call last):
>>>                File
>>>             "/usr/local/grass-7.5.svn/gui/wxpython/gui_core/goutput.py",
>>>             line 472, in OnCmdOutput
>>>
>>>             self.cmdOutput.AddStyledMessage(message, type)
>>>                File
>>>             "/usr/local/grass-7.5.svn/gui/wxpython/gui_core/goutput.py",
>>>             line 771, in AddStyledMessage
>>>
>>>             self.AddTextWrapped(message, wrap=None)
>>>                File
>>>             "/usr/local/grass-7.5.svn/gui/wxpython/gui_core/goutput.py",
>>>             line 722, in AddTextWrapped
>>>
>>>             self.AddText(txt)
>>>                File "/usr/lib/python2.7/dist-
>>>             packages/wx-3.0-gtk2/wx/stc.py", line 2041, in AddText
>>>
>>>             return _stc.StyledTextCtrl_AddText(*args, **kwargs)
>>>             UnicodeDecodeError
>>>             :
>>>             'ascii' codec can't decode byte 0xc3 in position 1: ordinal
>>>             not in range(128)
>>>             (Wed Jan  2 16:40:24 2019) Command finished (0 sec)
>>>
>>>             Is there anybody who know how I can solve this ? (with
>>>             GRASS v7.5 on
>>>             debian9)
>>>
>>>
>>>         Could you please send the precise version? It looks a bit
>>>         dated.
>>>
>>>         g.version -g
>>>
>>>         ?
>>>
>>         version=7.5.svn
>>         date=2018
>>         revision=r
>>         build_date=2018-08-10
>>         build_platform=x86_64-pc-linux-gnu
>>         build_off_t_size=8
>>
>>         But I was in en language. If I set in system (or french), it
>>         works!
>>
>>         In fact, I'm using sometimes English GUI because the scale
>>         bar text in psmap is not well coded and is displayed
>>         kilomÄ"tre, in english kilometer.
>>
>>         anyway, english GUI should handled special character isn't it ?
>>
>>         Best regards,
>>
>>         Frank
>>
>>>         Best
>>>         Markus
>>>
>>         _______________________________________________
>>         grass-user mailing list
>>         grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
>>         https://lists.osgeo.org/mailman/listinfo/grass-user
>>
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190103/79fdcead/attachment-0001.html>


More information about the grass-user mailing list