Add locale-sensitive ASCII transliteration API

Desktop / GNOME / GLib - Ryan Lortie [desrt.ca] - 20 February 2014 17:27 UTC

Add a new function, g_str_to_ascii() that does locale-dependent ASCII transliteration of UTF-8 strings.

This function works off of an internal database. We get the data out of the localedata shipped with glibc, which seems to be just about the best source of locale-sensitive transliteration information available anywhere.

We include a update script with this commit that's not used by anything at all -- it will just sit in git. It is intended to be run manually from time to time.

https://bugzilla.gnome.org/show_bug.cgi?id=710142

941b897 Add locale-sensitive ASCII transliteration API
docs/reference/glib/glib-sections.txt | 1 +
glib/Makefile.am | 1 +
glib/gstrfuncs.h | 4 +
glib/gtranslit-data.h | 12 +
glib/gtranslit.c | 409 ++++++++++++++++++++++++++++++++
glib/update-gtranslit.py | 410 +++++++++++++++++++++++++++++++++
6 files changed, 837 insertions(+)

Upstream: git.gnome.org


  • Share