Skip to content

Transform file to UTF-8 by Rust

License

Notifications You must be signed in to change notification settings

xn-sakina/kotone

Repository files navigation

kotone

Transform file to UTF-8 by Rust.

Install

  pnpm i -D kotone

Usage

import fs from 'fs'

import { transform } from 'kotone' // or import `transformSync`

const buffer = fs.readFileSync('file.txt')
const utf8 = await transform(buffer)
fs.writeFileSync("file-utf8.txt", utf8, 'utf-8')

Thanks/Inspiration

  • sjis-utf8: A small Node CLI for converting Shift-JIS encoded file into a UTF-8 encoded file.

License

MIT