utf16-to-sjis

v1.1.1
Tiny UTF-16 to Shift-JIS (CP932) converter.
sjis shift-jis utf-16 converter

utf16-to-sjis npm version

A small UTF-16 to Shift-JIS converter. 17KB if .gz compressed.

This library only supports Japanese characters in BMP (U+0000 to U+FFFF) because there are no characters in SMP that should be converted to Shift-JIS.

Usage

const { convert } = require("utf16-to-sjis");

const input = "文字列をShiftJISにヘンカンします。ⅰⅱⅲⅳⅴ ①②③㍼㍻";
const encoded = convert(input);

console.log(encoded);
npm i utf16-to-sjis

Metadata

  • MIT
  • Whatever
  • Mitsutaka Okazaki
  • released 4/2/2023

Downloads

Maintainers