Skip to main content

Unicode URLs w/ jQuery Mobile in Safari (OS X & iOS) -


i'm using jquery mobile build simple interface site uses many non-ascii urls.

for example:

http://localhost:1234/static/日本語.html 

this doesn't present problems, , same page can accessed using percent encoding:

http://localhost:1234/static/%e6%97%a5%e6%9c%ac%e8%aa%9e.html 

after loading jquery mobile in page headers links continue work, safari on ios 5.1.1 , safari 5.1.7 on os x display percent encoding in location bar seems invalid:

http://localhost:1234/static/%e5,%9e.html 

this problematic because urls can't bookmarked or accessed directly (returning 404). chrome displays urls intended.

incidentally, "%e5,%9e" doesn't seem match common percent encodings "日本語": http://www.motobit.com/util/url-encoder.asp?data=日本語

and finally, page headers i'm using load jquery mobile:

<meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile.structure-1.1.0.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script> 

unicode urls w/ jquery mobile in safari (os x & ios) - stack overflow

learn, share, build

each month, on 50 million developers come stack overflow learn, share knowledge, , build careers.

join world’s largest developer community.

sign up

i'm using jquery mobile build simple interface site uses many non-ascii urls.

for example:

http://localhost:1234/static/日本語.html 

this doesn't present problems, , same page can accessed using percent encoding:

http://localhost:1234/static/%e6%97%a5%e6%9c%ac%e8%aa%9e.html 

after loading jquery mobile in page headers links continue work, safari on ios 5.1.1 , safari 5.1.7 on os x display percent encoding in location bar seems invalid:

http://localhost:1234/static/%e5,%9e.html 

this problematic because urls can't bookmarked or accessed directly (returning 404). chrome displays urls intended.

incidentally, "%e5,%9e" doesn't seem match common percent encodings "日本語": http://www.motobit.com/util/url-encoder.asp?data=日本語

and finally, page headers i'm using load jquery mobile:

<meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile.structure-1.1.0.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script> 
share|improve question
    
are using raw iris in html links? avoid this, browser support isn't there yet. use uri-valid version (the percent encoding have above), , modern browsers still display iri version in address bar. – bobince jul 8 '12 @ 8:22
    
and...that answer! raw iris working didn't realize there still problems w/ browser support. encoding iris fixed issue, , (as suggested) safari still displays iri version in location bar. thanks! – morris cornell-morgan jul 10 '12 @ 7:49

your answer

 
discard

posting answer, agree privacy policy , terms of service.

browse other questions tagged or ask own question.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -