684
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
• These instructions convert the shift JIS character string in the device specified by (s) to a Unicode character string, and
store the converted data in the device specified by (d).
• The shift JIS character string in the device specified by (s) should be specified in little endian.
• The SJIS2WS(P) instruction does not add a byte order mark to the beginning of the data in the device specified by (d). To
add a byte order mark, use the SJIS2WSB(P) instruction.
Page 685 SJIS2WSB(P)
• The following figure shows the operation for converting shift JIS to Unicode.
*1 A two-byte character such as a kanji character represented in shift JIS code should be counted 2.
Error code
(SD0)
Description
2821H The ranges of data in the devices specified by (s) and (d) are overlapping.
3401H The range of data in the device specified by (s) includes a character code that cannot be converted.
3405H The character string in the device specified by (s) exceeds 16383 characters.
*1
$MOVP
(s) (d)
D100
D101
D0
D1
b15 b8 b7 b0
b15 b0
D102
D103
SM402
(s) (d)
M0
D0
SJIS2WSP D0 D100
"123"
0000H
31H32H 3100H
3200H
3300H
33H00H
(21)
(3)
(1)
(2)
(3)