[Date Prev][Date Next]
RE: String conversions UTF8 <-> ISO-8859-1
> -----Original Message-----
> From: Hallvard B Furuseth [mailto:email@example.com]
> Howard Chu writes:
> > Given that utilities like iconv and such exist, I think this is best
> > left as an exercise for the reader.
> If by 'the reader' you mean 'the user', I don't like that.
> If you mean
> 'the applicaton', I disagree just as strongly: It just leads to
> American/English-written applications that don't bother to handle
> character sets. Like ldapsearch. If the library offered
> character set
> handling, then applications could easily get character set
> handling, and
> they wouldn't all have to reinvent the wheel.
libldap is not schema-aware, and as Kurt has stated, it is not intended to
be. Without schema knowledge you can't do this correctly. Perhaps there
should be a new higher level library to address this issue.
> Besides, iconv is a program, not a library.
iconv is both; the API is part of the UNIX98 spec.
> What applications need is library support for
> character set handling, not some program they must pipe all
> I/O through.
The Unix programming paradigm has always been to create small, efficient,
single-purpose tools that can be piped together. Single programs that "do
everything" are harder to maintain in the long run, and generally don't do
anything very well. This is one of those key concepts about code reusability
that object-oriented programmers fail to grasp...
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support