[GRASS-dev] Re: [GRASS GIS] #745: r.report formatting doesn't seem
to be multi-byte aware
GRASS GIS
trac at osgeo.org
Fri Sep 10 02:31:29 EDT 2010
#745: r.report formatting doesn't seem to be multi-byte aware
-------------------------+--------------------------------------------------
Reporter: peifer | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.1
Component: Raster | Version: 6.4.0 RCs
Keywords: | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by peifer):
Replying to [comment:3 glynn]:
Thanks for the explanations, the situation seems to be complex. It might
not be worth investing to much time in this in order to get a nicer
"pritty print" functionality.
> BTW, regarding gawk/mawk: as the ticket notes, POSIX explicitly states
that awk matches the behaviour of printf, i.e. field widths are in bytes,
not characters/columns.
Gawk maintainer Arnold Robbins changed gawk's printf behaviour after I
pointed him to the issue, some 2 years ago. (Needless to say that he knows
that POSIX specifies it differently).
{{{
# bash built-in printf
[peifer:~]> printf "%-12s|\n" "dôležité"
dôležité |
# The other printf
[peifer:~]> /usr/bin/printf "%-12s|\n" "dôležité"
dôležité |
# Gawk 3.1.7 and higher
[peifer:~]> gawk 'BEGIN{ printf "%-12s|\n", "dôležité" }'
dôležité |
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/745#comment:4>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list