Calling InetGetHostAddress with non-ANSI chars in host name

Discussion about the SocketTools Library Edition and Secure Library Edition dynamic link libraries.

Moderator: Catalyst

Calling InetGetHostAddress with non-ANSI chars in host name

Postby Bob Brandin » Mon Feb 08, 2010 9:10 am

Is there any issue with calling InetGetHostAddress with a hostname containing non-ANSI characters? We have a machine name with Chinese characters that fails with an "invalid host name/unable to resolve" error. Thanks.
Bob Brandin
New Member
 
Posts: 9
Joined: Wed Apr 12, 2006 6:16 am

Re: Calling InetGetHostAddress with non-ANSI chars in host name

Postby Technical Support » Mon Feb 08, 2010 11:07 am

Domain names can only use a subset of ASCII characters, specifically letters, numbers and the hyphen. This is a fundamental part of the Domain Name System (DNS) since it was created. For domains that use non-ASCII characters (e.g.: Chinese), they have to be "encoded" so that they conform to the character set permitted by DNS. For more information, you can read about Internationalized Domain Names here. We don't have any direct support for that conversion and ultimately the call to InetGetHostAddress is passed to the Windows Sockets API to resolve the domain name, so the conversion using puny-code is something that you'd have to manage in your own code.
Technical Support
Knowledge Base | FAQs | Online Help
Technical Support
Catalyst
 
Posts: 2288
Joined: Mon Dec 27, 2004 3:38 am
Location: California


Return to SocketTools Library Edition

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron