string need to be robust

ZY Zhou rinick at GeeeMail.com
Sun Mar 13 07:18:24 PDT 2011


What if I'm making a text editor with D?
I know the text has something wrong, I want to open it and fix it. the exception
won't help, if the editor just refuse to open invalid file, then the editor is
useless.
Try open an invalid utf file with a text editor, like vim, you will understand
what I mean

== Quote from spir (denis.spir at gmail.com)'s article
> D offers an utf8 checking function (checking utf8 beeing the same as
> convertingto utf32, it just tries to convert and throws when fails). I would
> use before process to do what /you/ expect.
> Denis



More information about the Digitalmars-d mailing list