[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [idn] UTF-8 / RACE
- To: idn@ops.ietf.org
- Subject: RE: [idn] UTF-8 / RACE
- From: Yves Arrouye <yves@realnames.com>
- Date: Thu, 31 May 2001 23:24:32 -0700
- Delivery-date: Thu, 31 May 2001 23:25:08 -0700
- Envelope-to: idn-data@psg.com
> If gethostbyname() receives 8-bit text, should it assume that it's
UTF-8, or should it assume that it's in the encoding of the current
locale? My gut feeling is the latter. And of course gethostbyname()
should use the same encoding for both the argument and the return value.
It is very unlikely that gethostbyname() or any other function would be able
to make that determination except in simplistic cases. Many operating-system
provided locale models are not thread-safe, and threaded applications then
use other mechanisms that the OS may not be aware of. Internationalization
libraries, as another example, commonly provide their own locale model and
applications will use the library's rather than the OS.
So some encoding transformations will have to be done by the application.
Which does not mean that it may not be a good idea to change gethostbyname()
in some way, for Nameprep for example. I just doubt that one can achieve
full transparency in this case, unfortunately. Applications will need to be
changed.
YA