Internationalized Domain Names
Written February 27th, 2006
I just checked in optional support for internationalized domain names in FeedTools. FeedTools can now at least open all of his test feeds, and it seems to handle any of the links that only involve an internationalized domain name, so it reads the self link and the alternate link, but it fails to understand the enclosure, and it doesn’t yet provide the option to normalize the urls in the content.
1 2 3 4 5 6 7 8 |
require 'feed_tools' feed = FeedTools::Feed.open( 'http://www.詹姆斯.com/atomtests/iri/everything.atom') feed.href #=> "http://www.xn--8ws00zhy3a.com/atomtests/iri/everything.atom" feed.link #=> "http://www.xn--8ws00zhy3a.com/atomtests/iri/" |
In order for it to work, you need libidn installed as well as the idn gem for Ruby.
Leave a Response