Index: doc/new-features.sgml =================================================================== RCS file: /cvs/src/src/winsup/doc/new-features.sgml,v retrieving revision 1.60 diff -u -r1.60 new-features.sgml --- doc/new-features.sgml 9 Oct 2010 11:00:47 -0000 1.60 +++ doc/new-features.sgml 17 Nov 2010 21:41:09 -0000 @@ -38,6 +38,13 @@ Drop support for Windows NT4 prior to Service Pack 4. + +Fix the width of "CJK Ambiguous Width" characters to 1 for singlebyte charsets +and 2 for East Asian multibyte charsets. (For UTF-8, it remains dependent on +the specified language, and the "@cjknarrow" locale modifier can still be used +to force width 1.) + + Index: doc/setup2.sgml =================================================================== RCS file: /cvs/src/src/winsup/doc/setup2.sgml,v retrieving revision 1.45 diff -u -r1.45 setup2.sgml --- doc/setup2.sgml 18 Sep 2010 11:29:06 -0000 1.45 +++ doc/setup2.sgml 17 Nov 2010 21:41:10 -0000 @@ -353,17 +353,16 @@ There's a class of characters in the Unicode character set, called the -"CJK Ambiguous Width Character set". For these characters the width -returned by the wcwidth/wcswidth function is usually 1. This is often a -problem in East-Asian languages, which historically use character sets -in which these characters have a width of 2. By default, the -wcwidth/wcswidth functions return 1 as the width of these characters, -except if the language is specifed as "ja" (Japanese), "ko" (Korean), or -"zh" (Chinese). In these languages wcwidth and wcswidth return 2 for -these characters. This is not correct in all circumstances, so the user -of one of these languages can specify the modifier "@cjknarrow", which -modifies the behaviour of wcwidth/wcswidth to return 1 for the ambiguous -width characters. +"CJK Ambiguous Width" characters. For these characters, the width +returned by the wcwidth/wcswidth functions is usually 1. This can be a +problem with East-Asian languages, which historically use character sets +where these characters have a width of 2. Therefore, wcwidth/wcswidth +return 2 as the width of these characters when an East-Asian charset such +as GBK or SJIS is selected, or when UTF-8 is selected and the language is +specified as "zh" (Chinese), "ja" (Japanese), or "ko" (Korean). This is +not correct in all circumstances, hence the locale modifier "@cjknarrow" +can be used to force wcwidth/wcswidth to return 1 for the ambiguous width +characters.