Invalid byte 2 of 3-byte UTF-8 sequence.

Posted by gionnyDeep75 on 25-Oct-2010 10:55

I exposed a proces as a web service and

when I submit to my web service a special char such as 'à' my unwrap step return me

'Invalid byte 2 of 3-byte UTF-8 sequence.'

Look like encoding problem.

Any work around?



All Replies

Posted by Bill Wood on 29-Oct-2010 12:58

What is the application that is invoking the WebService?   In other words, how is the request being created.   Typically this error happens if the sending application is not using UTF-8.

Posted by tsteinbo on 01-Nov-2010 10:49

You might want to try setting the system property file.encoding to UTF-8 and see if things go away.


Posted by gionnyDeep75 on 16-Nov-2010 05:25

In which way?

Actually my workaround is done with a custom service before my unwrap step.But i really don't like it.

I've seen a advanced parameter called 'Array charset encoding' for my unwrap step.I set it to utf-8 but nothing is changed.

Posted by tsteinbo on 16-Nov-2010 10:55

Java System properties are set on the MF container. Go to SMC, select the container, choose properties, Environment tab. Add the property there and restart your container.

Posted by jerem on 23-Nov-2010 08:49


on which operating system do you work?

I had the same error :

the webservice client is sending uf-8 but Sonic is installed on iso-8859 system and then java try to read the file as iso-8859 even if encoding is set in xml file..

on unix/linux you can set the LANG system property.


Chan Jeremy

Posted by cipdwak on 23-Nov-2010 09:29

You must make sure that both file encoding and xml prolog directives match for this xml instance.


file.encoding=utf-8 means you must specify ''

on the other hand:

file.encoding=iso-8859-1 means you must specify '

This error probably means the encodings do not match, e.g file.encoding=iso-8859-1 but  with (wrong) directive  ''


This thread is closed