I think this is already handled. I am working in Java and the code is:

        HttpURLConnection con = (HttpURLConnection) url.openConnection();
        con.setRequestProperty("Accept", "application/rdf+xml");
        con.connect();
        InputStream is = con.getInputStream();

and then some Jena calls that load the triples from the InputStream in RDF/XML serialization.

At this stage, the response code is 200 and also con.getInstanceFollowRedirects() is true, so I assume that the API handles such cases automatically.

Does anyone have working code for such cases?

Thanks
Holger


On May 11, 2009, at 9:30 AM, Georgi Kobilarov wrote:

Hi Holger,

please check whether your program does correctly follow the 303 redirect to http://dbpedia.org/data/Sch%C3%B6nbrunn_Palace
that's where you should get your rdf data from.

Cheers,
Georgi

--
Georgi Kobilarov
Freie Universität Berlin
www.georgikobilarov.com

From: Holger Knublauch [mailto:[email protected]]
Sent: Monday, May 11, 2009 6:14 PM
To: [email protected]
Subject: [Dbpedia-discussion] Loading URLs with special characters

Hi all,

when I programmatically create an InputStream to download the RDF file for a URL with German "umlauts" such as

<http://dbpedia.org/resource/Sch%C3%B6nbrunn_Palace>

then the RDF file is empty (but with no error). How do I get the triples?

Thanks
Holger


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to