g_date_time_format: improve support for alt digits
authorRyan Lortie <desrt@desrt.ca>
Sun, 4 Sep 2011 00:12:53 +0000 (20:12 -0400)
committerRyan Lortie <desrt@desrt.ca>
Sun, 4 Sep 2011 03:06:18 +0000 (23:06 -0400)
commit2d7051e3a33a70a01d5ee06c1f10c347f6c08baf
treec7a396b76526787a594d1748244a9fe452581fd8
parent4a371c2ce5262cdecc48ab998e9b66ce7b46ee4b
g_date_time_format: improve support for alt digits

Improve a few situations where g_date_time_format() was getting the
padding wrong when displaying alt digits (eg: Arabic numerals) for
formatting time.

We now depend on nl_langinfo (_NL_CTYPE_OUTDIGITn_WC) to do the
conversion, which is very likely glibc-specific, but our previous method
relied on a glibc-specific printf() feature, so no harm done there.

Add a configure check for nl_langinfo (_NL_CTYPE_OUTDIGITn_WC).

Uncomment a few testcases that were failing previously.

https://bugzilla.gnome.org/show_bug.cgi?id=658107
configure.ac
glib/gdatetime.c
glib/tests/gdatetime.c