# define __STDC_IEC_559_COMPLEX__ 1
#endif
-/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
- Unicode 6.0. */
-#define __STDC_ISO_10646__ 201103L
+/* wchar_t uses Unicode 7.0.0. Version 7.0 of the Unicode Standard is
+ synchronized with ISO/IEC 10646:2012, plus Amendments 1 (published
+ on April, 2013) and 2 (not yet published as of February, 2015).
+ Additionally, it includes the accelerated publication of U+20BD
+ RUBLE SIGN. Therefore Unicode 7.0.0 is between 10646:2012 and
+ 10646:2014, and so we use the date ISO/IEC 10646:2012 Amd.1 was
+ published. */
+#define __STDC_ISO_10646__ 201304L
/* We do not support C11 <threads.h>. */
#define __STDC_NO_THREADS__ 1
#!/usr/bin/python3
# -*- coding: utf-8 -*-
-# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
+# Copyright (C) 2014-2015 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
# The GNU C Library is free software; you can redistribute it and/or
# Auxiliary tables for Hangul syllable names, see the Unicode 3.0 book,
# sections 3.11 and 4.4.
-jamo_initial_short_name = [
+JAMO_INITIAL_SHORT_NAME = (
'G', 'GG', 'N', 'D', 'DD', 'R', 'M', 'B', 'BB', 'S', 'SS', '', 'J', 'JJ',
'C', 'K', 'T', 'P', 'H'
-]
+)
-jamo_medial_short_name = [
+JAMO_MEDIAL_SHORT_NAME = (
'A', 'AE', 'YA', 'YAE', 'EO', 'E', 'YEO', 'YE', 'O', 'WA', 'WAE', 'OE',
'YO', 'U', 'WEO', 'WE', 'WI', 'YU', 'EU', 'YI', 'I'
-]
+)
-jamo_final_short_name = [
+JAMO_FINAL_SHORT_NAME = (
'', 'G', 'GG', 'GS', 'N', 'NI', 'NH', 'D', 'L', 'LG', 'LM', 'LB', 'LS',
'LT', 'LP', 'LH', 'M', 'B', 'BS', 'S', 'SS', 'NG', 'J', 'C', 'K', 'T',
'P', 'H'
-]
+)
def ucs_symbol(code_point):
'''Return the UCS symbol string for a Unicode character.'''
index2, index3 = divmod(i - 0xaC00, 28)
index1, index2 = divmod(index2, 21)
hangul_syllable_name = 'HANGUL SYLLABLE ' \
- + jamo_initial_short_name[index1] \
- + jamo_medial_short_name[index2] \
- + jamo_final_short_name[index3]
+ + JAMO_INITIAL_SHORT_NAME[index1] \
+ + JAMO_MEDIAL_SHORT_NAME[index2] \
+ + JAMO_FINAL_SHORT_NAME[index3]
outfile.write('{:<11s} {:<12s} {:s}\n'.format(
ucs_symbol(i), convert_to_hex(i),
hangul_syllable_name))