×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Default encoding of Java Strings is ISO-8859-1 instead of UTF-8 on S60 2nd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
Forum Nokia KB (Talk | contribs)
m (Protected "KIJ000084 - Default encoding is ISO-8859-1 instead of UTF-8" [edit=sysop:move=sysop])
extkbeditor2 (Talk | contribs)
m
Line 1: Line 1:
 
 
{{KBKI}}
 
{{KBKI}}
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
==Default encoding is ISO-8859-1 instead of UTF-8          KIJ000084==
+
{{KnowledgeBase
'''Platform:''' S60 2nd Edition '''Device:''' Nokia 6600
+
|id=KIJ000084
 
+
|platform=S60 2nd Edition  
'''Description:'''
+
|devices=Nokia 6600
 +
|category=
 +
|subcategory=
 +
|creationdate=
 +
|keywords=
 +
}}
  
 +
==Description==
 
Default encoding is ISO-8859-1 instead of UTF-8.
 
Default encoding is ISO-8859-1 instead of UTF-8.
  
'''Solution:'''
+
==Solution==
 +
When using data, which should be UTF-8, do not assume the default charset is UTF-8 but define it explicitly. For example:<br><br>String s = new String(byteArray, "utf-8");
  
When using data, which should be UTF-8, do not assume the default charset is UTF-8 but define it explicitly. For example:<br><br>String s = new String(byteArray, "utf-8");
 
 
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition]]
 
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition]]

Revision as of 20:10, 13 October 2008

Template:KBKI


Article Metadata
Tested with
Devices(s): Nokia 6600
Compatibility
Platform(s): S60 2nd Edition
S60 2nd Edition (initial release)
Article
Created: ()
Last edited: extkbeditor2 (13 Oct 2008)

Description

Default encoding is ISO-8859-1 instead of UTF-8.

Solution

When using data, which should be UTF-8, do not assume the default charset is UTF-8 but define it explicitly. For example:

String s = new String(byteArray, "utf-8");

95 page views in the last 30 days.
×