[Issue 23405] New: Doc is wrong on use of useReplacementDchar

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 12 01:32:25 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23405

          Issue ID: 23405
           Summary: Doc is wrong on use of useReplacementDchar
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

Reported here: https://news.ycombinator.com/item?id=33170701

what I think is probably a docbug at this URL:
https://dlang.org/phobos/std_utf.html#.byUTF

"Throws: UTFException if invalid UTF sequence and useReplacementDchar is set to
UseReplacementDchar.yes"

My guess is that this is a mistake and should instead say
UseReplacementDchar.no since it makes sense to throw an exception if you can't
use U+FFFD here, rather than do both.

--


More information about the Digitalmars-d-bugs mailing list