[GRASS5] PATCH: asprintf.c
Glynn Clements
glynn at gclements.plus.com
Mon Jun 20 10:13:46 EDT 2005
Hamish wrote:
> > > G_asprintf()
>
> also, should/does it support multi-byte chars now we are in the i18n biz?
> e.g. gettext/intl/vasnprintf.c
Do you mean wide characters? If so, the current G_asprintf()
implementation will support whatever vfprintf() supports. For all
C9X-compatible implementations (including GNU libc 2.x), that includes
%lc and %ls.
The %s specifier deals with byte strings; it doesn't care about
encodings. The %c specifier deals with individual bytes; it can't be
used to write a multi-byte character.
C9X also defines fwprintf(), swprintf() etc, which output wide strings
using a wide format string. As almost nothing in GRASS understands
wide strings, there wouldn't be much point in providing an interface
to those.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list