Why do I get incorrect vector length using NATIVE2UNICODE command on Japanese Windows machine?

2 views (last 30 days)
I have a vector of length 1x8 and I am converting the vector to unicode using the command NATIVE2UNICODE in MATLAB 7.2 (R2006a). When I check the size of the converted unicode, MATLAB is returning the answer as 1x7. This behavior is not seen in English version of windows machine. It can be reproduced only on Japanese version of Windows.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Both NATIVE2UNICODE and UNICODE2NATIVE functions are designed to handle only valid character codes as inputs.
This problem can happen with certain encoding schemes, such as Shift-JIS, GBK or Big5. It occurs if non-supported character codes are input as character data. If a valid character code is detected at the leading-byte position but an invalid character code follows the leading-byte, NATIVE2UNICODE does not properly handle the character code sequence.

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products


Release

R2006a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!