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
New Contributor
Posts: 2
Registered: ‎01-03-2012
My Device: BB 9700 & 9900
My Carrier: SFR (French carreer)
Accepted Solution

display special character from JSON result

Hi all,

 

first of all, thanks to all of you for your disponibility et qui answer to all the different thread, it was very helpfull for me to begin my developpement.

It's my first post, i will try to be clear :

in my method to retrieve Http to json String by using this :

 

...

httpConnection = (HttpConnection) Connector.open(url+ ";interface=wifi",Connector.READ_WRITE,true);

...

inputStream = (InputStream)httpConnection.openInputStream();

..

resultString = new String(IOUtilities.streamToBytes(inputStream));

...

 

the resultString contains character like "ï" or "é" that are supposed to be french character "î" or "é".

 

how can i do to print the right french charcacter insterad of this special character ??

 

Thanks for all

Highlighted
New Contributor
Posts: 2
Registered: ‎01-03-2012
My Device: BB 9700 & 9900
My Carrier: SFR (French carreer)

Re: display special character from JSON result

sorry for my post, i just found the solution here :

http://supportforums.blackberry.com/t5/Java-Development/could-not-print-french-characters-from-a-jso...

by doing this :

String str = new String(IOUtilities.streamToBytes(input,2), "utf-8");