diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-12-11 12:45:19 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-12-11 12:45:19 +0000 |
commit | 85bafe6f3d0e4647af5e74178b46abdf44d3b981 (patch) | |
tree | bb6033cdf1d2cd10e26ddf42fa009a923e256807 /localedata/unicode-gen/unicode_utils.py | |
parent | 77356912e83601fd0240d22fe4d960348b82b5c3 (diff) | |
download | glibc-85bafe6f3d0e4647af5e74178b46abdf44d3b981.tar.gz glibc-85bafe6f3d0e4647af5e74178b46abdf44d3b981.tar.xz glibc-85bafe6f3d0e4647af5e74178b46abdf44d3b981.zip |
Automate LC_CTYPE generation for tr_TR, update to Unicode 8.0.0 (bug 18491).
This patch makes the automation of Unicode LC_CTYPE generation also support generating the modified LC_CTYPE used for Turkish (where case conversions of 'i' and 'I' differ from ASCII conventions), so allowing that to be more readily kept in sync for future Unicode updates. The patch includes the locale update generated by the scripts. Tested for x86_64. [BZ #18491] * unicode-gen/unicode_utils.py (to_upper_turkish): New function. (to_lower_turkish): Likewise. * unicode-gen/gen_unicode_ctype.py (output_tables): Support producing output with Turkish case conversions. (--turkish): New command-line option. * unicode-gen/Makefile (GENERATED): Add tr_TR. (tr_TR): New rule. * locales/tr_TR: Regenerate LC_CTYPE.
Diffstat (limited to 'localedata/unicode-gen/unicode_utils.py')
-rw-r--r-- | localedata/unicode-gen/unicode_utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/localedata/unicode-gen/unicode_utils.py b/localedata/unicode-gen/unicode_utils.py index ee91582823..26a57ef293 100644 --- a/localedata/unicode-gen/unicode_utils.py +++ b/localedata/unicode-gen/unicode_utils.py @@ -220,6 +220,20 @@ def to_lower(code_point): else: return code_point +def to_upper_turkish(code_point): + '''Returns the code point of the Turkish uppercase version + of the given code point''' + if code_point == 0x0069: + return 0x0130 + return to_upper(code_point) + +def to_lower_turkish(code_point): + '''Returns the code point of the Turkish lowercase version + of the given code point''' + if code_point == 0x0049: + return 0x0131 + return to_lower(code_point) + def to_title(code_point): '''Returns the code point of the titlecase version of the given code point''' |