String implementations

James Dennett jdennett at acm.org
Sun Jan 20 11:02:18 PST 2008


Janice Caron wrote:
> On 1/20/08, Jarrod <qwerty at ytre.wq> wrote:
>>> But I still don't see what this has got to do with whether or not a[n]
>>> should identify the (n+1)th character rather than the (n+1)th code unit.
>> Because this issue isn't really to do with the input file itself, it's to
>> do with the potential input characters given in the file.
> 
> You mean the plain text config file of unknown encoding?

Let's stop here.  If you don't know the encoding, you can't
safely process the file.  That's nothing to do with language
or library designs.  You can't process data whose format
you do not know.

(Yes, you can employ heuristics to try to guess, but they can
be wrong, and in the case of text files there are many files
which are valid in numerous encodings but have different
meanings.)

-- James



More information about the Digitalmars-d mailing list