IBM Support

webMethods Knowlegebase : JS Serialization (1757038)

Troubleshooting


Problem

Javascript Serialization.

Sending some objects over a Nirvana queue containing UTF-8 encoded strings, but when consumed, they are encoded differently, creating strange characters.

E.g. when we send:

"Some test text, a total of €230.3m (down 2.2% YoY) on – ALERT”

receive:

"Some test text, a total of ?230.3m (down 2.2% YoY) on ? ALERT” - FIREFOX

"Some test text, a total of €230.3m (down 2.2% YoY) on – ALERT" - Chrome

It works fine on an older IE (Internet Explorer) v8 browser.

With regards to the UTF-8 problems with the Nirvana Javascript library, perhaps the problem is that some browsers are using the native BTOA implementation, which does not support UTF-8 characters.

Details of this can be found at the following link:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding#The_.22Unicode_Problem.22

A possible fix for this would be reverting to the Webtoolkit implementation within the Nirvana.js file that is currently in the code to support browsers that do not support BTOA.

It’s slower than native implementations, but it successfully decodes UTF-8 characters.

The JS code reference for this can be found at the following link:

http://www.webtoolkit.info/javascript-base64.html#.U_XPhxD6m3p

Lines affected in the Nirvana.js library are 1660:1670.

A possible solution would be to change 1660:1670 to:

base64Decode = nBase64Decode;

What are the options with UM/Universal Messaging now?

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSVYEV","label":"IBM webMethods Integration"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows XP Professional"}],"Version":"7.0"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFIWYE","label":"IBM webMethods B2B"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows XP Professional"}],"Version":"7.0"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17210581