idn

Do browsers encode in punycode only domain or whole url?

橙三吉。 提交于 2019-12-10 18:12:56
问题 I was reading about IDN homograph atack and didn't find exactly stated does browsers encode in punycode only domain or rest of the URL is included (path and query). So my question is does one of popular browsers (FF, IE, Chrome, Safari, Opera) encode rest of the URL (IRI to be exact) with punycode ? 回答1: Only the domain name part is encoded with punycode. This is due to the restrictions imposed on the allowable characters in a (traditional) domain name. The path part of the URL has no such

Are IDN domain names case-sensitive?

懵懂的女人 提交于 2019-12-03 12:45:29
问题 Some people will reply that domain names are not case-sensitive. In the new Unicode world this is no longer true. (Source) I thought one of the steps in the Unicode > Punycode conversion was a "normalisation", which rendered domain names lower case. 回答1: For old-fashioned ASCII-based domain names, Yes, domain names have been and continue to be case-insensitive. For example, all of these represent the same domain: example.com Example.com EXAMPLE.COM EXampLE.com In modern DNS, we now have

What is the maximum length of an IDNA converted domain name?

假如想象 提交于 2019-12-03 12:18:55
First things first: I'm storing multiple domains to a database, after I've converted each and every domain name to it's IDNA version. What I need to know the maximum length such an IDNA-converted domain name can have so I can define the database field's max length. Known fact: Now, I know the maximum number of characters in a domain name (including any subdomains) is 255 characters. Where I lost it: That's easy at first glance, but... does this mean regular ascii characters of international characters (think UTF-8 encoding)? To give you an example: The domain "müller.de" has 9 characters when

Are IDN domain names case-sensitive?

我只是一个虾纸丫 提交于 2019-12-03 02:15:57
Some people will reply that domain names are not case-sensitive. In the new Unicode world this is no longer true. ( Source ) I thought one of the steps in the Unicode > Punycode conversion was a "normalisation", which rendered domain names lower case. For old-fashioned ASCII -based domain names , Yes, domain names have been and continue to be case-insensitive. For example, all of these represent the same domain: example.com Example.com EXAMPLE.COM EXampLE.com In modern DNS , we now have Internationalized Domain Names (IDN) which allows Unicode characters. The problem is that defining upper-

Ruby convert IDN domain from Punycode to Unicode

旧街凉风 提交于 2019-11-30 21:17:38
I'm writing a Rails app that needs to convert an IDN domain name from Punycode into its Unicode equivalent. I tried installing the idn gem that has bindings to GNU LibIDN, but it won't compile the native code. Apparently others have the same issue with Ruby 1.9.x. I also tried the pure Ruby SimpleIDN gem , but I would prefer something native. Leo Grove Try the simpleidn gem . It works with Ruby 1.8.7 and 1.9.2. Edit your Gemfile: gem 'simpleidn' then you can enter the command as follows: SimpleIDN.to_unicode("xn--mllerriis-l8a.com") => "møllerriis.com" SimpleIDN.to_ascii("møllerriis.com") =>

How to convert IDN to ASCII?

人盡茶涼 提交于 2019-11-28 23:34:19
What is the best way to convert an internationalized domain name to its ASCII-form? I want to convert Bücher.ch into xn--bcher-kva.ch by using some sort of (free) .net code. Have a look at the GNU IDN Library - Libidn . The introduction says that C# libraries are available. adam using System.Globalization; ... IdnMapping idn = new IdnMapping(); MessageBox.Show(idn.GetAscii("www.kraków.pl")); To Get the other way around from xn--bcher-kva.ch domain to Bücher.ch using System.Globalization; ... IdnMapping idn = new IdnMapping(); MessageBox.Show(idn.GetUnicode("xn--bcher-kva.ch")); You will get

Properly Matching a IDN URL

邮差的信 提交于 2019-11-27 15:52:23
I need help building a regular expression that can properly match an URL inside free text. scheme One of the following: ftp , http , https (is ftps a protocol?) optional user (and optional pass ) host (with support for IDNs) support for www and sub-domain(s) (with support for IDNs) basic filtering of TLDs ( [a-zA-Z]{2,6} is enough I think) optional port number path (optional, with support for Unicode chars) query (optional, with support for Unicode chars) fragment (optional, with support for Unicode chars) Here is what I could find out about sub-domains: A "subdomain" expresses relative

Properly Matching a IDN URL

霸气de小男生 提交于 2019-11-26 18:33:49
问题 I need help building a regular expression that can properly match an URL inside free text. scheme One of the following: ftp , http , https (is ftps a protocol?) optional user (and optional pass ) host (with support for IDNs) support for www and sub-domain(s) (with support for IDNs) basic filtering of TLDs ( [a-zA-Z]{2,6} is enough I think) optional port number path (optional, with support for Unicode chars) query (optional, with support for Unicode chars) fragment (optional, with support for