[GRASS-dev] [GRASS GIS] #3726: special characters in psmap scalebar unit

GRASS GIS trac at osgeo.org
Thu Jan 10 00:12:57 PST 2019


#3726: special characters in psmap scalebar unit
--------------------------+---------------------------------
  Reporter:  1266         |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:
 Component:  Default      |    Version:  svn-releasebranch76
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

 Replying to [ticket:3726 1266]:
 > special characters are not correctly displayed for psmap module
 scalebar.
 > For example:
 > scalebar s
 >     units kilometers
 >     ...
 > does not display special characters of kilom[è]tres in french.

 Just guessing here, but could it be that the translated strings (po files)
 are in UTF-8 while ps.map expects all strings to be iso-8859-1 ? In
 [https://trac.osgeo.org/grass/browser/grass/trunk/ps/ps.map/do_scalebar.c#L193
 do_scalebar.c] there is:


 {{{
 193         else if(sb.units == SB_UNITS_KM)
 194             strcpy(num, _("kilometers"));
 }}}

 so kilometers is translated and that's why you automatically get the non-
 ascii characters, but in a different encoding than the one expected.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3726#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list