IRI support in a CPAN lib
by Eric Prud'hommeaux other posts by this author
Jul 22 2007 1:16PM messages near this date
view in the new Beta List Site
using XML::LibXML on hp11
|
Re: IRI support in a CPAN lib
& XSLT (interpreting Perl-XML as Perl-Web here, sorry)
background (I hope it's mostly accurate...):
IRIs are like URIs except they allow non-ascii chars
http://japanese.example.org/ç´è±?
HTTP IRIs need to be converted to URLs in a request:
GET /%E7%B4%8D%E8%B1%86 HTTP/1.1
Host: japanse.example.org
Non-ascii chars in the domain section
http://æ?¥æ?¬èª?.example.org/ç´è±?
get converted to punycode before resolution.
host xn--wgv71a119e.example.org
RDF uses IRIs (or at least, so decided the DAWG) and the occasional
RDF program wants to do an HTTP GET on one of these puppies. This is
kind of like slinging URIs around, but you don't want the library to
do any normalizing ala
$str =~ s/([^$uric\#])/$URI::Escape::escapes{$1}/go;
as it does for URI::http.
Problem:
I want to use an IRI class in my RDF code. I looked in
http://cpan.org/modules/01modules.index.html
and didn't find relevent matches for '.*iri.*'. Anybody
got such a library secreted about their person?
--
-eric
office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
mobile: +1.617.599.3509
(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.
Thread:
Eric Prud'hommeaux
Bjoern Hoehrmann
|