[Issue 6791] std.algorithm.splitter random indexes utf strings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 18 22:22:42 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6791


hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx


--- Comment #1 from hsteoh at quickfur.ath.cx 2013-08-18 22:22:41 PDT ---
This is caused by struct SplitterResult in std.algorithm using array slicing
and array indexing to pass char (not dchar!) to the lambda. SplitterResult
appears to have multiple issues: it uses array slicing without a proper
signature constraint on hasSlicing, and doesn't work properly for narrow
strings because it uses indexing which for narrow strings doesn't handle
multibyte UTF-8 sequences properly.

It appears to be wanting a rewrite that uses only forward range primitives, or
at least, an overload for narrow strings that properly take multibyte
characters into account.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list