Skip to content

WebWorks SDK does not permit non-ASCII characters in //widget/name in config.xml #47

Open
chawco opened this Issue Jan 19, 2012 · 0 comments

1 participant

@chawco
chawco commented Jan 19, 2012

When producing applications with internationalized names (i.e., UTF-8 encoded but outside of normal ASCII range), WebWorks will throw an error while packaging the .bar file. The behaviour is reproducible with either simple UTF-8 encoded strings within config.xml, or when using XML-escaped unicode code point entities.

Example (note //widget/name):

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        id="myappid"
        version="0.5.11"
        rim:header="RIM-Widget:rim/widget">
  <name>é</name>
...

Or alternatively:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        id="myappid"
        version="0.5.11"
        rim:header="RIM-Widget:rim/widget">
  <name>&#233;</name>
...

Both cases result in the following output from the 'bbwp' utility:

bbwp build/bin/myapp.zip -o build/bin/
[INFO]        Parsing command line options
[INFO]        Parsing bbwp.properties
[INFO]        Validating WebWorks archive
[INFO]        Parsing config.xml 
[INFO]        Populating application source
[INFO]        Compiling WebWorks application
[INFO]        Packaging the bar file
Error: Invalid byte 1 of 1-byte UTF-8 sequence.

Judging from this behaviour, it appears the name byte stream is being interpreted into a non-UTF-8 encoded stream, and passed to some internal process which is expecting a UTF-8 encoded stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.