3 ms·
yeah, a definite lack of utf-8 character support -- but this could get a bit ugly from the implementation point of view.
by bestest 13y ago
yeah, a definite lack of utf-8 character support -- but this could get a bit ugly from the implementation point of view.
- nakedrobot2 13y agoYeah, lots of Czech characters get omitted - anything with an accent on it. So this Na baště Svatého Jiří, 160 00 Prague-Prague 6, Czech Republic becomes this http://nice-map-urls.herokuapp.com/czech-republic/hlavn-msto-praha/prague/prague-6/na-bat-svatho-ji http://nice-map-urls.herokuapp.com/czech-republic/hlavn-msto...
- captainbenises 13y agoI'm using iconv to convert from utf-8 to ascii, but the transliteration isn't as complete as I'd like. :( Sorry it strips out prague addresses. I tried using utf-8 urls but I couldn't work out how to handle them in rails. Actually, looking at the search term you entered, I must have a bug, because the iconv output is correct, it definitely shouldn't be stripping letters out of the url.
- jakobe 13y agoWhen converting from utf-8 to ascii with iconv, try specifying "ASCII//TRANSLIT" as target encoding to avoid removing foreign characters.
- pornel 13y agoYour foreign characters are my native. UTF-8 is 20 years old now. Just use it already!
- jakobe 13y agoJeeze... do you really think that your native characters are a good idea to be used in an URL? Take this URL for example: http://archaeologie-ooe.info/orte/hoersching http://archaeologie-ooe.info/orte/hoersching I could have used UTF-8, and made the URL http://archäologie-oö.info/orte/hörsching http://archäologie-oö.info/orte/hörsching, but then all of the sudden 95% of the worlds population couldn't type that URL anymore.
- infinita740 13y agosure but they could have easily replaced all the problematic characters by "simpler ones" like é,è->e, œ -> oe having an address (in France) containing some of these characters the deletion make it barely readable, therefore useless since the goal is to have understandable urls