[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28359] matchtitle underscore width not with the title when title c
From: |
Patrice Dumas |
Subject: |
[bug #28359] matchtitle underscore width not with the title when title contain wide char |
Date: |
Mon, 11 Jan 2010 20:44:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.6 (like Firefox/3.5.6; Debian-3.5.6-1) |
Follow-up Comment #16, bug #28359 (project texinfo):
Text::CharWidth in fact is not very good. This is simply a frontend to
wcswidth and friends. But this is not what we need here, since the encoding is
the document encoding, not the locale encoding. As shown by the translation
issue, switching locales reliably cannot easily be done when using the system
locales implementation.
Fortunately I found some potential replacements:
http://search.cpan.org/~audreyt/Unicode-EastAsianWidth-1.30/
is very simple, pure perl. It allows to find the width of east asian
characters.
http://search.cpan.org/~nezumi/Unicode-LineBreak-1.007.520/
is also interesting since it additionnally handle the issue of detecting
linebreaks. It is mixed C/perl, and much more complicated, however. But it
could replace the current end of line cutting code.
I am still undecided regarding what to use. The most comprehensive would
certainly be along
* use a difference code when Unicode-LineBreak is installed that delegates
end of line breaking to this module
* otherwise use Unicode-EastAsianWidth and expand the already existing code
to use the right length and use the additional properties to decide where to
break lines. A copy of Unicode-EastAsianWidth could be shipped in texinfo, in
the same way than libintl-perl to be used if needed.
I am a bit unwilling to complicate that much, but I can't decide what
approach is the better at the same time...
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28359>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #28359] matchtitle underscore width not with the title when title contain wide char,
Patrice Dumas <=