Function

GLibWin32getlocale

Declaration [src]

gchar*
g_win32_getlocale (
  void
)

Description [src]

The setlocale() function in the Microsoft C library uses locale names of the form “English_United States.1252” etc. We want the UNIXish standard form “en_US”, “zh_TW” etc. This function gets the current thread locale from Windows - without any encoding info - and returns it as a string of the above form for use in forming file names etc. The returned string should be deallocated with g_free().

Return value

Type: gchar*

Newly-allocated locale name.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.