James Holderness: I’ve just been putting together a test feed for IRI support in Atom.
I wonder how many feed consumers (from simple aggregators to the most complex blog engines) support Internationalizing Domain Names in Applications?
James Holderness: I’ve just been putting together a test feed for IRI support in Atom.
I wonder how many feed consumers (from the simplest aggregator to the most complex blog search engines) support Internationalizing Domain Names in Applications?
James provided a useful test feed:
Fixing the Feed Validator was easy due to this support being built into Python:
iri=uri.decode('idna') uri=iri.encode('idna')
http://www.詹姆斯.com/
to http://www.xn--8ws00zhy3a.com/
.Bob, this worked for me (on Ubuntu):
sudo apt-get install libidn11-dev gem install idn irb require 'rubygems' require 'idn' IDN::Idna.toASCII('http://www.詹姆斯.com/')
Excellent, thank you.
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.
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/"