On Tue, Aug 26, 2008 at 09:32:32AM +0200, Bruno Haible wrote: > Probably the Solaris wcwidth is made to match some Japanese terminal > emulators, rather than xterm? In such terminal emulators, many characters > that have width 1 in xterm are represented with width 2. > > U+2022 (BULLET) is designated as "ambiguous width" in Unicode 5.0.0 > (ftp.unicode.org > ArchiveVersions/5.0.0/ucd/extracted/DerivedEastAsianWidth.txt) > therefore I don't want to consider Solaris wrong here. You have to understand > that wcwidth is only an approximation because different terminal emulators > behave differently.
Well, Solaris wcwidth has many other deficiencies, e.g: solaris_wcwidth(0x220)=-1 mk_wcwidth(0x220)=1 solaris_wcwidth(0x221)=-1 mk_wcwidth(0x221)=1 solaris_wcwidth(0x234)=-1 mk_wcwidth(0x234)=1 solaris_wcwidth(0x235)=-1 mk_wcwidth(0x235)=1 solaris_wcwidth(0x236)=-1 mk_wcwidth(0x236)=1 solaris_wcwidth(0x237)=-1 mk_wcwidth(0x237)=1 The corresponding unicode letters for reference: 0220;LATIN CAPITAL LETTER N WITH LONG RIGHT LEG;Lu;0;L;;;;;N;;;;019E; 0221;LATIN SMALL LETTER D WITH CURL;Ll;0;L;;;;;N;;;;; 0234;LATIN SMALL LETTER L WITH CURL;Ll;0;L;;;;;N;;;;; 0235;LATIN SMALL LETTER N WITH CURL;Ll;0;L;;;;;N;;;;; 0236;LATIN SMALL LETTER T WITH CURL;Ll;0;L;;;;;N;;;;; 0237;LATIN SMALL LETTER DOTLESS J;Ll;0;L;;;;;N;;;;; (And yes, I did not forget to call setlocale this time :) -- Alexander.