[GRASS-dev] [GRASS GIS] #3392: t.register: encoding error

GRASS GIS trac at osgeo.org
Tue Sep 19 04:01:38 PDT 2017


#3392: t.register: encoding error
--------------------------+---------------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.2.3
 Component:  Temporal     |    Version:  svn-trunk
Resolution:               |   Keywords:  t.register encoding
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by glynn):

 Replying to [comment:33 mlennert]:
 > Replying to [comment:32 glynn]:
 > > The functions in grass.script should **never** return unicode. That
 module reads the contents of files (which are sequences of bytes) and the
 output from processes (again, sequences of bytes).
 >
 > Is this true for translated module messages as well ?

 Yes. Anything which originates as a byte string (e.g. output from
 commands, contents of files) should be kept as a byte string. Anything
 which (for whatever reason) originates as a unicode string should be
 encoded at the earliest opportunity.

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



More information about the grass-dev mailing list