Thursday, July 7, 2011

OSB encoding in XQuery

All the XQuery files in $domain/osb/config/core are stored in UFT-8 encoding:

?xml version="1.0" encoding="UFT-8"?

When you edit the XQuery through the OSB console, the application will take care of encoding weird characters (â, é, ü...) into a sequence of bytes (3 bytes, I guess).

If you have to edit manually the XQuery, and deploy it directly, YOU are responsible to encode the file.

The simplest option is to use Notepad++ and do Encode/Convert to UTF-8

If you deploy the XQuery with improper encoding, the server will not even start and throw horrible UTF8Decoder exceptions (!!!!).


Another alternative for encoding could be using the "file" Linux utility, but I haven't tested this.

http://mindspill.net/computing/linux-notes/determine-and-change-file-character-encoding.html

No comments: