I have implemented a placename lookup based on a web service
Request:
http://ws.geonames.org/findNearbyPlaceName?" "lat=50.46823299999998&lng=8.653849999999999&alt=1040
Answer:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geonames>
<geoname>
<name>Pohl Göns</name>
<lat>50.4666667</lat>
<lng>8.65</lng>
<geonameId>2852975</geonameId>
<countryCode>DE</countryCode>
<countryName>Germany</countryName>
<fcl>P</fcl>
<fcode>PPL</fcode>
<distance>0.3233816416273773</distance>
</geoname>
</geonames>
Here my REBOL code smippet extracting the information.
REBOL []
url: to-url rejoin ["http://ws.geonames.org/findNearbyPlaceName?" "lat=50.46823299999998&lng=8.653849999999999&alt=1040"]
citydata: read url
parse citydata [thru "<name>" copy cityname to "</name>"]
write to-file rejoin [cityname ".txt"] citydata
Works fine until I use cityname to create a filename.
it ends up like this: Pohl Göns.txt
Anyone have a solution to convert the special characters (ex. ä ö ü é è ß etc.)
so the filename shows up correct?
I use View 1.3 on Win XP SP2
Thanks