Ticket #544 (closed defect: wontfix)
v.info lacks -g switch
|Reported by:||neteler||Owned by:||grass-dev@…|
Problem: the absence of the -g flag breaks some scripts which use v.info in a non-English locale. The -t flag is not sufficient. Details:
On Wed, Apr 1, 2009 at 1:52 PM, Glynn Clements wrote:
The problem is that v.info doesn't have an option to produce machine-readable output. The -t switch doesn't cover all of the information which v.info can output. FWIW, v.report has:
COLNAMES="`v.info -c map=$MAP layer=$LAYER | grep -v '^Displaying column type' | ...
But the 'Displaying column type' message is localised. v.report uses LC_ALL=C, which solves the above issue but is a bug in and of itself. The comment says:
# setting environment, so that sort works properly in all languages LC_ALL=C # according to 'man sort'
If it's just for sorting, it should be setting LC_CTYPE (but LC_ALL has to be unset, which means that the other LC_* variables have to be set to $LC_ALL first). But every occurence of "sort" in that script uses -n, which shouldn't be affected by locale.