> How does gethostbyname() *know for sure* what the character set of its > argument is? Answer: it doesn't, because there is no way that it can. Let me suggest a different answer: gethostbyname() knows what the character set of the argument is because, by definition, it is ASCII. it's a bad idea to try to change this, because if you do, you break one of the assumptions on which code that uses gethostbyname was written. you also create new failure modes which existing code does not anticipate. (as another example - when the ctype macros/functions were made locale-specific, it broke code that was using them to try to parse protocol elements that required ASCII. ) if you want an interface to look up addresses from IDNs - whether it be in native format, UTF-8, or whatever - you need a different function. don't overload gethostbyname. but don't try to retroactively change an existing interface. Keith
- Re: [idn] The layers and characte... 김_경석-GIM_Gyeongseog
- Re: [idn] The layers and characte... Paul Hoffman / IMC
- RE: [idn] The layers and characte... Brian W. Spolarich
- Re: [idn] The layers and characte... Keith Moore
- Re: [idn] The layers and characte... Paul Hoffman / IMC
- Re: [idn] The layers and characte... Keith Moore
- Re: [idn] The layers and characte... Paul Hoffman / IMC
- Re: [idn] The layers and characte... Eric Brunner-Williams in Portland Maine
- Re: [idn] The layers and characte... Dan
- Re: [idn] The layers and characte... David C Lawrence
- Re: [idn] The layers and characte... Keith Moore
- Re: [idn] The layers and characte... Patrik F�ltstr�m
- Re: [idn] The layers and characte... Marc Blanchet
- Re: [idn] The layers and characte... John C Klensin
- Re: [idn] The layers and characte... Patrik F�ltstr�m
- Re: [idn] The layers and characte... John C Klensin
- Re: [idn] The layers and characte... Patrik F�ltstr�m
- Re: [idn] The layers and characte... John C Klensin
- Re: [idn] The layers and characte... D. J. Bernstein
- Re: [idn] The layers and characte... Patrik F�ltstr�m
- Re: [idn] The layers and characte... Erik Nordmark
