gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue with char_mbtowc/iconv


From: Daniele Forsi
Subject: Re: issue with char_mbtowc/iconv
Date: Fri, 10 May 2013 00:02:20 +0200

2013/5/9 Raphaël:

> ... it just beat me again in a subtle case, and AFAIR it's not the
> first time LANG is discussed:
>
> Using LANG=C (what is sometimes useful)

no, I don't think that is useful nowadays because it uses the 7-bit
ASCII character set,
in fact in the "testsuite" we set LC_MESSAGES=C to get untranslated
error messages without changing other user settings

> gn_char_get_encoding() is
> initialized to ANSI_X3.4-1968 and that's the charset chosen to treat an
> input vcard file... so obviously char_mbtowc() fails (with an UTF-8 vcf).
>
>
> It could be good to write it down somewhere so that other people could
> understand:
> $LANG not only affect the gnokii output language, but *also* the way it
> treats input files (what IHMO isn't appropriate ;))

it can be added somewhere to the wiki, but people don't need to change
that varaible and that's how setlocale() works, see the man page and
gnokii just does what every other program does and the man page says:
setlocale(LC_ALL, "");

--
Daniele Forsi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]