×
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)
hamishwillee (Talk | contribs)
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Archived|timestamp=20120608174937|user=[[User:Lpvalente|Lpvalente]]}}
 +
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition (initial release)]]
  
{{KBKI}}
 
__NOTOC__
 
__NOEDITSECTION__
 
==Default encoding is ISO-8859-1 instead of UTF-8          KIJ000084==
 
'''Platform:''' S60 2nd Edition  '''Device:''' Nokia 6600
 
  
'''Description:'''
+
{{ArticleMetaData <!-- v1.2 -->
 +
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 +
|devices= Nokia 6600
 +
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
 +
|platform= S60 2nd Edition
 +
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20070820
 +
|author= [[User:Technical writer 1]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory=
 +
|id= KIJ000084
 +
}}
  
Default encoding is ISO-8859-1 instead of UTF-8.
+
==Description==
 +
{{Abstract|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:
  
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");
+
<code java> String s = new String(byteArray, "utf-8"); </code>
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition]]
+

Revision as of 10:45, 18 June 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


Article Metadata
Tested with
Devices(s): Nokia 6600
Compatibility
Platform(s): S60 2nd Edition
S60 2nd Edition (initial release)
Article
Created: User:Technical writer 1 (20 Aug 2007)
Last edited: hamishwillee (18 Jun 2012)

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");
140 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×