Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Accented character on Blackberry device and simulator

Hi All,

 

I have an issue on accented character on BB Handheld.

 

Client side: String Url = http://IPAddress:port/action String temp = "test=" + "ïÓ".getBytes(); temp=Url+"?"+temp; //Logger.log("Connection query string: "+temp); conn = (HttpConnection)Connector.open(temp); Server side: .... HttpReqest req.... String test = req.getParameter("test"); System.out.println("test code " + test);

 

the problem is that it works fine on simulator.when I load it from simulator, it will return correct accented character.

 

but it works bad on device. it will give me some strange character.

 

my device is:8703e, version 4.2.1.110

 

simulator is: 8703e, version 4.2.1.89

 

Thanks in advanced.

 

 

Developer
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Re: Accented character on Blackberry device and simulator

A little correction.

This code is the exactly same as source code.

 

Client side: byte[] accChar = "ïÓ".getBytes(); String Url = http://IPAddress:port/action String temp = "test=" + new String(accChar); temp=Url+"?"+temp; //Logger.log("Connection query string: "+temp); conn = (HttpConnection)Connector.open(temp); Server side: .... HttpReqest req.... String test = req.getParameter("test"); System.out.println("test code " + test);

 

 

Thanks guys, any idea would be great appriciated!!

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Accented character on Blackberry device and simulator

The character sets available on a BlackBerry device can vary based on the languages installed on it.  You can see the installed languages by going to Options, Localization.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker