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

Web and WebWorks Development

Invalid UTF-8 encoding error occurs when building BlackBerry WebWorks application

by Retired on ‎10-25-2010 09:35 AM (3,147 Views)


The BlackBerry® WebWorks™ Packager displays a compilation error if the config.xml file contains characters that fall outside of the UTF-8 character set.  This issue typically occurs for developers who wish to display a localized name under the application icon on the home screen.




BUILDING sketchPad
cmd.exe /c bbwp C:\sandbox\web apps\sketchPad\build\sketchPad.zip /o C:\sandbox\web apps\sketchPad\build
[INFO]      		Parsing command line options
[INFO]      		Parsing bbwp.properties
[INFO]      		Validating widget archive
[INFO]      		Parsing config.xml 
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8 sequence.


The BlackBerry WebWorks packager supports UTF-8 encoding within the config.xml document.


Recommended Solution:

Ensure that all content saved within the config.xml is encoded using the UTF-8 character set.


Optional Solution:

If a developer wishes to set the home screen application name to contain non UTF-8 characters, they can accomplish this by using the background page feature of the BlackBerry WebWorks App platform. 


Using this technique, an application can call blackberry.app.setHomeScreenName() to change the name of the home screen icon to a different value than what was specified in the config.xml file such as non UTF-8 characters.  


The sample project  attached to this article demonstrates how to use a background page to change the application icon name when the application is first installed and/or started.

Users Online
Currently online: 34 members 1,769 guests
Please welcome our newest community members: