Hi, * Sun Mar 4 2007 TAKIZAWA Takashi <[EMAIL PROTECTED]> > On Sun, Mar 04, 2007 at 07:18:14PM +0900, > TAKAHASHI Tamotsu wrote: > > > I'm for it, as MLTerm has "col_size_of_width_a" option > > and vim has "ambwidth". But I have several questions: > > > > 1. What is legacy_ja? > > Most of your code is clean, but the only thing I can't > > understand is legacy_ja. Isn't there any side effect? > > Why don't you just make it optional, e.g. > > $more_widechars="00A2:00A3:00A5:00A6:00AC:00AF:2212"? > > I think this is better than hard-coding them, though > > much slower. Or am I missing something? > > The conversion table of most iconv refers to the following table for Japanese. > ftp://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0208.TXT > It is necessary to treat the character as Wide, Fullwidth, or Ambiguous > in this table. > However, some of the above-mentioned character have been treated > as Narrow or Neutral in the following table. > ftp://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt > Therefore, lagacy_ja need not be customized, and is additional as > the bugfix to the table.
I see. Thanks for your information. So there's no mystery in your patch any more. > > 3. Can't we special-case East Asian Ambiguous class? > > Many users are using their system's wcwidth instead of > > mutt's one at this moment. So I don't think it is good > > to use mutt's wcwidth by default. Instead, what about > > using system's wcwidth after checking Ambiguous in mutt? > > Of cource this requires many s/wcwidth/mutt_wcwidth/g, > > but it worth the effort, doesn't it? > > I had tried to use mutt_wcwidth() that wrapped wcwidth() before. > However, it did not go well. > The cause is for the curses library to use wcwidth(). > If mutt_wcwidth() is not the same as the result of wcwidth() of the system, > the column in the display shifts. Ah, I got it. Mutt and curses share wcwidth. So we have to modify wcwidth, not mutt_wcwidth. > The patch was corrected in consideration of the opinion of Tamotsu-san. > http://www.emaillab.org/mutt/1.5.14/patch-1.5.14.tt.wcwidth.2 > It uses wcwidth() of the system by default. Ambiguous cannot be handled. > It comes to be able to treat Ambiguous by putting --enable-cjk-ambiguous-width > by the configure script. Thanks! But you look a little confused. ;) | AC_HELP_STRING([--enable-cjk-ambiguous-width], | [ Disable change of character-cell width of East Asian Ambiguous class]), should be "Enable." BTW, if I were you, I'd write [ Enable East Asian Ambiguous characters support (using own wcwidth)] and AC_DEFINE(ENABLE_CJK_WIDTH,1,[ Define if you want to support East Asian Ambiguous class. ]) ...Well, I may be wrong, too, though. And one more thing: Your patch conflicts with ESMTP in protos.h. You can put your macros after mutt_save_confirm so that it applies cleanly against HEAD or tip. Thanks, -- tamo