Bug 871 - request for idn (intl domain names) support
Summary: request for idn (intl domain names) support
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 3.8.1p1
Hardware: All Linux
: P2 enhancement
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-23 06:27 AEST by Egmont Koblinger
Modified: 2013-11-10 20:57 AEDT (History)
1 user (show)

See Also:


Attachments
my really quick-and-dirty patch (8.78 KB, patch)
2004-05-23 06:28 AEST, Egmont Koblinger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Egmont Koblinger 2004-05-23 06:27:10 AEST
This entry is meant to be a feature request for handling host names with
accents in them.

I see at least two ways of possible technical approaches: either use the libidn
library, or use the AI_IDN and AI_CANONIDN flags or getaddrinfo() which are
available at least in glibc cvs and some brand new distros e.g. Fedora 2.

I send a quick & dirty & should-not-be-applied-as-it-is patch which is kind of
a case study that "okay it's really not that hard to make it work". It basically
works, however, there are some bugs/notes which might require some attention.

- it sure needs some autoconf'isation to autodetect whether AI_IDN and
  AI_CANONIDN are available.

- setlocale() is required, since getaddrinfo() assumes the accented host names
  are encoded in the current locale's charset.

- Currently the host name is put in .ssh/known_hosts exactly as the same byte
  sequence as it was given to ssh. So if I use a latin1 terminal to connect to
  an accented host, and later I use an utf-8 terminal then it's not recognized
  to be the same host, actually, it is added once again to known_hosts with a
  different encoding. It's even possible theoretically that two different hosts
  from two terminals using different encodings conflict each other in this file.
  So I'd recomment to always use utf-8 when storing host names in files,
  regardless of the current locale.

- When I have latinX terminal, everything is fine now. However, in UTF-8
  terminal I see this:
  $ ssh óx
  The authenticity of host 'óx' (...)' can't be established.
                            ^^ this is okay
  RSA key fingerprint is ...
  Are you sure you want to continue connecting (yes/no)? yes
  Warning: Permanently added '\303\263x' (RSA) to the list of known hosts.
                              ^^^^^^^^ this is not okay
  ...
  ...
  Connection to óx closed.
                ^^ okay again
  So that \ooo escaping should be removed.

I hope you don't find it a silly request.
Comment 1 Egmont Koblinger 2004-05-23 06:28:58 AEST
Created attachment 640 [details]
my really quick-and-dirty patch
Comment 2 Damien Miller 2004-06-26 09:16:18 AEST
We won't support setlocale() until OpenBSD gets support for it, hopefully this
will be in the coming { days -> months }
Comment 3 Michael Stapelberg 2013-11-10 20:57:47 AEDT
(In reply to Damien Miller from comment #2)
> We won't support setlocale() until OpenBSD gets support for it,
> hopefully this
> will be in the coming { days -> months }
According to http://www.openbsd.org/cgi-bin/man.cgi?query=setlocale&sektion=3, OpenBSD supports setlocale().

Can we have IDN now, please? :)

If there’s any way I can help, let me know.