mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 06:12:08 +00:00
10 lines
261 B
TypeScript
10 lines
261 B
TypeScript
import { test, expect } from "bun:test";
|
|
|
|
test("shift_jis", () => {
|
|
const bytes = [147, 250, 150, 123, 140, 234];
|
|
|
|
const decoder = new TextDecoder("shift_jis");
|
|
const data = decoder.decode(Uint8Array.from(bytes));
|
|
expect(data).toEqual("日本語");
|
|
});
|