I am writing a subroutine in MIPS assembly language for converting ASCII to UTF-16 and vice versa. However, I could not find any trick how to convert it.
Thanks for any ideas.
Pseudocode, assuming your bytes are octets and that zero termination is not required:
MOVZX
UCS2 ( 16- ), ASCII, short <-> char -, , 128.
short <-> char
ASCII .
ISO-646 Unicode UTF-16. , "7-" ASCII Unicode (.. 16- ), , , 8 Unicode, ASCII, , .
, , ISO-8859-1 (Latin-1), . , , .