bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UTF-8 Encoding / Browser Launch Problem

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
tupac



Joined: 20 Jun 2011
Posts: 13

PostPosted: Tue Jan 17, 2012 10:00 pm    Post subject: UTF-8 Encoding / Browser Launch Problem Reply with quote

So I am trying to navigate to a url with a underscore in it

Everything is working except when I launch the app the url is morphed.. I'm sure this has something to do with utf-8 encoding but I'm not seeing a solution.

u8 PROGMEM t_url[] = "testdomain.com/certain_file";
launch_browser (t_url, Q_LAUNCH_BROWSER_NEW);

The browser is then opened to "testdomain.com/certain%c2%a7file"

I'd just change the file url name if I could but I can't.. any ideas?
Back to top
View user's profile Send private message
Tim



Joined: 30 Sep 2011
Posts: 12

PostPosted: Wed Jan 18, 2012 9:19 am    Post subject: Reply with quote

I've recently had this problem. It's due to the difference between the standard ASCII and the GSM character sets. The underscore (and some other punctuation characters) has a different code in GSM. Use a value of 0x11 in your C code to get an underscore. So your string will be
u8 PROGMEM t_url[] = "testdomain.com/certain\x11file";
See GSM 23.038 for the full GSM 7 bit character set.
Hope this helps Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group