Passing multibyte strings in JavaScript - TechRepublic
General discussion
March 9, 2001 at 04:33 AM
shanghai sam

Passing multibyte strings in JavaScript

by shanghai sam . Updated 24 years, 3 months ago

I am using JavaScript to support a multilingual website. My pages are created when accessed by loading an html template with language data from a text array.

This works well with single byte pan-european text encodings. However when I attempt this will multi byte shift-jis or jp-euc, I often encounter character corruption when the bytes are shifted. This results in nonsensical or offensive japanese text.

Is there a way to define a double byte character so I can preserve the japanese text when passing it as a string?

Thank you,
John M Wilson

This discussion is locked

All Comments