urlread / urlwrite with umlaut in the url - is there a way to get this to work?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Bjoern Eskofier
am 23 Apr. 2014
Bearbeitet: Jan
am 23 Apr. 2014
Dear all,
I am trying to read a url that contains german umlauts. This does, apparently, not work with urlread/urlwrite. An example:
urlread('http://www.möbel.de')
produces an error, whereas:
urlread('http://www.moebel.de')
works. Both urls link to the same webpage in this example, btw.
Is there a way to get this to work? In my case, I can not just replace the umlaut (ä -> ae, ö -> oe, ü -> ue), since then the url can not be resolved.
Thanks!
Bjoern
0 Kommentare
Akzeptierte Antwort
Friedrich
am 23 Apr. 2014
HI,
you need to punnycode the name. Try
urlread(char(java.net.IDN.toASCII('http://www.möbel.de')))
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!