Decode URI Component with Charset such as 'euc-kr' without tears.
- Typescript support
- Tiny package size
$ npm install decode-uri-component-charset
or
$ yarn add decode-uri-component-charset
import { decodeURIComponentCharset } from 'decode-uri-component-charset';
// or const { decodeURIComponentCharset } = require('decode-uri-component-charset');
const euckr = '%C5%D7%BD%BA%C6%AE';
// '테스트' < This word.
// Encoded URI with UTF-8 '%ED%85%8C%EC%8A%A4%ED%8A%B8'
// Encoded URI with EUC-KR '%C5%D7%BD%BA%C6%AE'
decodeURIComponent(euckr);
// Uncaught URIError: URI malformed
const result = decodeURIComponentCharset(euckr, 'euc-kr');
console.log(result);
// '테스트'
Type: String
Charset string based on iconv-lite.
Type: String
Type: String
- React Checklist - Make Checkbox List Easy and Simple with React Hooks.
- React Store - React Hook Store with useContext and useReducer for State Management.
- React Quilljs - React Hook Wrapper for Quill(Rich Text Editor).
MIT