Created attachment 155585 [details] Fix short month names and replace %b with %_m in date_fmt for Chinese locales When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returns numbers. nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414日' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '月' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, but I have not done much testing to know whether it can cause other problems in Chinese locales. The GNU C Library also returns values with '月' appended.
A commit references this bug: Author: delphij Date: Thu Oct 8 17:48:50 UTC 2015 New revision: 289041 URL: https://svnweb.freebsd.org/changeset/base/289041 Log: Fix short month names and replace %b with %_m in date_fmt for Chinese locales. When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returned numbers. For instance, nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414?' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '?' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, and this matches the en_US.ISO8859-1 behavior, which returns 'Oct'. The GNU C Library also returns values with '?' appended. PR: 199441 Submitted by: Ting-Wei Lan <lantw44 gmail com> MFC after: 2 weeks Changes: head/share/timedef/zh_CN.GB18030.src head/share/timedef/zh_CN.GB2312.src head/share/timedef/zh_CN.UTF-8.src head/share/timedef/zh_CN.eucCN.src head/share/timedef/zh_TW.Big5.src head/share/timedef/zh_TW.UTF-8.src
Committed, thanks!
A commit references this bug: Author: delphij Date: Thu Oct 29 17:00:52 UTC 2015 New revision: 290150 URL: https://svnweb.freebsd.org/changeset/base/290150 Log: MFC r289038,r289041: Add encoding for mime-types. Fix short month names and replace %b with %_m in date_fmt for Chinese locales. When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returned numbers. For instance, nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414?' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '?' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, and this matches the en_US.ISO8859-1 behavior, which returns 'Oct'. The GNU C Library also returns values with '?' appended. PR: 199441 Submitted by: Ting-Wei Lan <lantw44 gmail com> Changes: _U stable/10/ stable/10/share/timedef/zh_CN.GB18030.src stable/10/share/timedef/zh_CN.GB2312.src stable/10/share/timedef/zh_CN.UTF-8.src stable/10/share/timedef/zh_CN.eucCN.src stable/10/share/timedef/zh_TW.Big5.src stable/10/share/timedef/zh_TW.UTF-8.src
A commit references this bug: Author: delphij Date: Thu Oct 29 17:04:44 UTC 2015 New revision: 290151 URL: https://svnweb.freebsd.org/changeset/base/290151 Log: MFC r289038,r289041: Add encoding for mime-types. Fix short month names and replace %b with %_m in date_fmt for Chinese locales. When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8, nl_langinfo(ABMON_*) only returned numbers. For instance, nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and so on. This causes problems in applications that put the short month name and the day of the month together. For example, 'Apr 14' in English becomes '414?' in Chinese on the top bar of GNOME Shell. This problem may be resolved by appending '?' to all short month names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already does this, and this matches the en_US.ISO8859-1 behavior, which returns 'Oct'. The GNU C Library also returns values with '?' appended. PR: 199441 Submitted by: Ting-Wei Lan <lantw44 gmail com> Changes: _U stable/9/share/timedef/ stable/9/share/timedef/zh_CN.GB18030.src stable/9/share/timedef/zh_CN.GB2312.src stable/9/share/timedef/zh_CN.UTF-8.src stable/9/share/timedef/zh_CN.eucCN.src stable/9/share/timedef/zh_TW.Big5.src stable/9/share/timedef/zh_TW.UTF-8.src
This change have been merged to all supported -STABLE branches, thanks for your submission!
A commit references this bug: Author: kevlo Date: Fri Sep 2 00:27:27 UTC 2016 New revision: 305264 URL: https://svnweb.freebsd.org/changeset/base/305264 Log: Replace %m with %_m in date_fmt for Chinese locales. This is a fix for the problem mentioned in the PR. PR: 199441 Changes: head/tools/tools/locale/tools/cldr2def.pl