:: Forums :: Discussions :: Locator
 
<< Previous thread | Next thread >>
Unicode characters in city names?
Moderators: nlstart
This thread is now closed
Author Post
jvg
Registered Member #1286
Joined:
Posts: 5
Hello,

If there's unicode characters in the city name (Göteborg f.ex.), the "city link" is not working ( /locator.php?cty.Göteborg ). No (Google) map is shown, other citys without unicode characters work fine.

I had to urlencode & utf8_decode the name before storing in DB:
$locator_city = $tp->toDB(urlencode(utf8_decode($_POST['locator_city'])));

This way the name is stored as "G%F6teborg".

And reverse when printing the city name (except for the link itself), somthing like this:
$text_temp .= " <a href='locator.php?cty.".$row7_locator_city."'>".utf8_encode(urldecode($row7[locator_city]))."</a> ".$divide_char;


Not sure if this makes any sense, i'm sure there's an easier way to do it.. ?

/j
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System