Closed Bug 672472 Opened 10 years ago Closed 10 years ago
hyphenator does not handle non-ASCII characters correctly
Because I misinterpreted the libhyphen API in bug 253317, hyphenation positions are not returned correctly when non-ASCII characters are present. (This doesn't affect the en-US patterns, but showed up once I started testing with more languages for bug 672320.) The issue is that although the hnj_hyphen_hyphenate2() function takes the text as an 8-bit string, with a length in bytes, the hyphens array that it returns (when using UTF-8 dictionaries) is indexed by Unicode character count, not (as I assumed) by UTF-8 code unit positions in the input string. This means that the conversion of hyphenation-point offsets to our UTF-16 text representation is incorrect.
Attachment #546742 - Flags: review?(smontagu)
Attachment #546742 - Flags: review?(smontagu) → review+
Pushed to mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/faa1737443dd
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.