[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [idn] Extending gethostbyname()
In fact, when gethostbyname() was extended to use DNS (and YP, later NIS)
rather than simply looking up names in /etc/hosts, it broke numerous applications.
This happened because gethostbyname() had no way to return temporary failure
(e.g. DNS server unreachable) as opposed to "this domain does not exist".
This caused a lot of bounced mail.
More generally, experience suggests that any time you change a programming
interface in an incompatible way then you need to make that change explicit,
rather than to change the behavior that existing applications expect.
Perhaps for some programs the change really will be as trivial as
s/gethostbyname/gethostbyidn/ or whatnot. But I doubt this will be true
in general. For instance, given that UNIX systems deployed today use a wide
variety of locales and character sets, if I were updating a UNIX program that
was in widespread use I wouldn't want that program to assume that its output
device displays UTF-8. Even if UNIX vendors are now supporting UTF-8,
not everyone will upgrade their systems immediately, and some will continue
to use old locales. So I'd probably want a separate routine to convert
an IDN from internal format to the format required by the display.
It might be a NOOP for the case when the display supported UTF-8, but it
would be needed in other cases.
Keith