Bug 24471 - lzh_TW (LC_TIME): Numbers from 32 to 99 can not be represented in Chinese numeral
Summary: lzh_TW (LC_TIME): Numbers from 32 to 99 can not be represented in Chinese num...
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: 2.29
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-22 03:52 UTC by TAMUKI Shoichi
Modified: 2019-04-23 08:48 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TAMUKI Shoichi 2019-04-22 03:52:37 UTC
In Literary Chinese locale for the Republic of China (lzh_TW), numbers
of 32 or more in year, minute, and second can not be represented in
Chinese numeral:

$ LANG=lzh_TW date -d "1931-04-01 09:00:00" +"%Oy年"
卅一年
$ LANG=lzh_TW date -d "1932-04-01 09:00:00" +"%Oy年"
32年
$ LANG=lzh_TW date -d "2019-04-22 12:31:30" +"%OH時%OM分%OS秒"
十二時卅一分卅秒
$ LANG=lzh_TW date -d "2019-04-22 12:32:30" +"%OH時%OM分%OS秒"
十二時32分卅秒
$ LANG=lzh_TW date -d "2019-04-22 12:32:31" +"%OH時%OM分%OS秒"
十二時32分卅一秒
$ LANG=lzh_TW date -d "2019-04-22 12:32:32" +"%OH時%OM分%OS秒"
十二時32分32秒

In other locales that use alt_digits, they are defined up to 99
elements.  That should also be followed for lzh_TW locale.
Comment 1 TAMUKI Shoichi 2019-04-22 03:55:34 UTC
I think that alt_digits in lzh_TW should be defined the following
Chinese numerals:

	ja_JP		lzh_TW
0	〇		〇
1	一		一
2	二		二
3	三		三
4	四		四
5	五		五
6	六		六
7	七		七
8	八		八
9	九		九
10	十		十
11	十一		十一
12	十二		十二
13	十三		十三
14	十四		十四
15	十五		十五
16	十六		十六
17	十七		十七
18	十八		十八
19	十九		十九
20	二十		廿
21	二十一		廿一
22	二十二		廿二
23	二十三		廿三
24	二十四		廿四
25	二十五		廿五
26	二十六		廿六
27	二十七		廿七
28	二十八		廿八
29	二十九		廿九
30	三十		卅
31	三十一		卅一
32	三十二		卅二
33	三十三		卅三
34	三十四		卅四
35	三十五		卅五
36	三十六		卅六
37	三十七		卅七
38	三十八		卅八
39	三十九		卅九
40	四十		卌
41	四十一		卌一
42	四十二		卌二
43	四十三		卌三
44	四十四		卌四
45	四十五		卌五
46	四十六		卌六
47	四十七		卌七
48	四十八		卌八
49	四十九		卌九
50	五十		五十
51	五十一		五十一
52	五十二		五十二
53	五十三		五十三
54	五十四		五十四
55	五十五		五十五
56	五十六		五十六
57	五十七		五十七
58	五十八		五十八
59	五十九		五十九
60	六十		六十
61	六十一		六十一
62	六十二		六十二
63	六十三		六十三
64	六十四		六十四
65	六十五		六十五
66	六十六		六十六
67	六十七		六十七
68	六十八		六十八
69	六十九		六十九
70	七十		七十
71	七十一		七十一
72	七十二		七十二
73	七十三		七十三
74	七十四		七十四
75	七十五		七十五
76	七十六		七十六
77	七十七		七十七
78	七十八		七十八
79	七十九		七十九
80	八十		八十
81	八十一		八十一
82	八十二		八十二
83	八十三		八十三
84	八十四		八十四
85	八十五		八十五
86	八十六		八十六
87	八十七		八十七
88	八十八		八十八
89	八十九		八十九
90	九十		九十
91	九十一		九十一
92	九十二		九十二
93	九十三		九十三
94	九十四		九十四
95	九十五		九十五
96	九十六		九十六
97	九十七		九十七
98	九十八		九十八
99	九十九		九十九
Comment 2 Wei-Lun Chao 2019-04-22 05:32:39 UTC
The patch in Bug 24409 is partially against this issue,
though only appends numbers from 32 to 59.
Comment 3 TAMUKI Shoichi 2019-04-23 00:14:30 UTC
Hello Wei-Lun-san,

(In reply to Wei-Lun Chao from comment #2)
> The patch in Bug 24409 is partially against this issue,
> though only appends numbers from 32 to 59.

Thank you for the information.

I have a question.  In lzh_TW locale, which of the following is better
when representing numbers from 40 to 49 in Chinese numerals?

40	四十		卌
41	四十一		卌一
42	四十二		卌二
43	四十三		卌三
44	四十四		卌四
45	四十五		卌五
46	四十六		卌六
47	四十七		卌七
48	四十八		卌八
49	四十九		卌九

As far as I examined, it seems that the latter (right side)
representation often appears.
Comment 4 Wei-Lun Chao 2019-04-23 05:08:36 UTC
First, I'm not literary chinese expert :)
In modern chinese, we use 廿(20) and 卅(30) for date format,
but rare with 卌(40) even for time format.
In classical chinese, use of 廿 and 卅 may be more often,
but 卌 is still unusual to see.
Comment 5 TAMUKI Shoichi 2019-04-23 07:17:02 UTC
Thank you.

So, let's use the former (left side) in Comment 3.

By the way, we are trying to implement alternative representation for
year with alternative numeric symbols in glibc (Bug 24453).

In lzh_TW locale, it is Minguo year 108 and has reached three digits.
In this case, the following representations are considered.  In Japan,
these representations are commonly used especially in vertical
writing.

Are these also common in Taiwan?

平成三十一年
民國一〇八年
二〇一九年

This issue is related to Bug 18666.
Comment 6 Wei-Lun Chao 2019-04-23 07:58:42 UTC
(In reply to TAMUKI Shoichi from comment #5)
> By the way, we are trying to implement alternative representation for
> year with alternative numeric symbols in glibc (Bug 24453).
> In lzh_TW locale, it is Minguo year 108 and has reached three digits.
> In this case, the following representations are considered.  In Japan,
> these representations are commonly used especially in vertical
> writing.
Yes, after patching Bug 24293 we have the same problem.

> Are these also common in Taiwan?
> 平成三十一年
> 民國一〇八年
> 二〇一九年
> This issue is related to Bug 18666.
Yes, these three are common representations in Taiwan.