View Single Post
Old 11-02-2018, 05:58 PM   #52
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@sherman: I'll be busy for the next few hours, so, go ahead .

Initial findings would point to the fact that the various c_index vs. chars_in_str checks are wrong, because c_index is the *byte* index in the string array, while chars_in_str is the amount of unicode "characters".
Since bytes >= unicode chars, drift slowly accumulates as more multi-byte characters are encountered, and we abort the loop early.

Of lesser import, the md parser stuff is also massively not unicode aware, but we already knew that ;p.

----

And, yeah, now that I've checked, I can see somewhat valid use cases for >255pt, so that's an easy fix, at least .

Last edited by NiLuJe; 11-02-2018 at 06:03 PM.
NiLuJe is offline   Reply With Quote