mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 13:19:21 +02:00
glib/gutf8.c (g_get_charset) glib/gconvert.c (g_locale_from_utf8) Clarify
2008-02-21 Tor Lillqvist <tml@novell.com> * glib/gutf8.c (g_get_charset) * glib/gconvert.c (g_locale_from_utf8) * docs/reference/glib/running.sgml: Clarify character set issues on Windows. svn path=/branches/glib-2-14/; revision=6552
This commit is contained in:
committed by
Tor Lillqvist
parent
540d41ec4b
commit
0976f73d27
@@ -1,3 +1,9 @@
|
|||||||
|
2008-02-21 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/gutf8.c (g_get_charset)
|
||||||
|
* glib/gconvert.c (g_locale_from_utf8): Clarify character set
|
||||||
|
issues on Windows.
|
||||||
|
|
||||||
2008-02-07 Tor Lillqvist <tml@novell.com>
|
2008-02-07 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
* configure.in: Unfortunately the mingw implementations of
|
* configure.in: Unfortunately the mingw implementations of
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
2008-02-21 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glib/running.sgml: Clarify character set issues on Windows.
|
||||||
|
|
||||||
2008-02-06 Matthias Clasen <mclasen@redhat.com>
|
2008-02-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.14.6 ===
|
* === Released 2.14.6 ===
|
||||||
|
@@ -214,6 +214,22 @@ call <function>setlocale (LC_ALL, "")</function> to set up the current
|
|||||||
locale.
|
locale.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
On Windows, in a C program there are several locale concepts
|
||||||
|
that not necessarily are synchronized. On one hand, there is the
|
||||||
|
system default ANSI code-page, which determines what encoding is used
|
||||||
|
for file names handled by the C library's functions and the Win32
|
||||||
|
API. (We are talking about the "narrow" functions here that take
|
||||||
|
character pointers, not the "wide" ones.)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
On the other hand, there is the C library's current locale. The
|
||||||
|
character set (code-page) used by that is not necessarily the same as
|
||||||
|
the system default ANSI code-page. Strings in this character set are
|
||||||
|
returned by functions like <function>strftime</function>.
|
||||||
|
</para>
|
||||||
|
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2>
|
||||||
|
@@ -1091,7 +1091,8 @@ g_locale_to_utf8 (const gchar *opsysstring,
|
|||||||
*
|
*
|
||||||
* Converts a string from UTF-8 to the encoding used for strings by
|
* Converts a string from UTF-8 to the encoding used for strings by
|
||||||
* the C runtime (usually the same as that used by the operating
|
* the C runtime (usually the same as that used by the operating
|
||||||
* system) in the <link linkend="setlocale">current locale</link>.
|
* system) in the <link linkend="setlocale">current locale</link>. On
|
||||||
|
* Windows this means the system codepage.
|
||||||
*
|
*
|
||||||
* Return value: The converted string, or %NULL on an error.
|
* Return value: The converted string, or %NULL on an error.
|
||||||
**/
|
**/
|
||||||
|
@@ -510,6 +510,12 @@ charset_cache_free (gpointer data)
|
|||||||
* other encoding. (Frequently g_locale_to_utf8() and g_locale_from_utf8()
|
* other encoding. (Frequently g_locale_to_utf8() and g_locale_from_utf8()
|
||||||
* are nice shortcuts, though.)
|
* are nice shortcuts, though.)
|
||||||
*
|
*
|
||||||
|
* On Windows the character set returned by this function is the
|
||||||
|
* so-called system default ANSI code-page. That is the character set
|
||||||
|
* used by the "narrow" versions of C library and Win32 functions that
|
||||||
|
* handle file names. It might be different from the character set
|
||||||
|
* used by the C library's current locale.
|
||||||
|
*
|
||||||
* The return value is %TRUE if the locale's encoding is UTF-8, in that
|
* The return value is %TRUE if the locale's encoding is UTF-8, in that
|
||||||
* case you can perhaps avoid calling g_convert().
|
* case you can perhaps avoid calling g_convert().
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user