Skip to content

Error when trying to encode Vietnamese chars #23

Description

@soubhikchatterjee

Error when trying to encode Vietnamese chars

InvalidCharacterError
at /home/runner/invalidlatin/node_modules/base-64/base64.js:23:36
at Object. (/home/runner/invalidlatin/node_modules/base-64/base64.js:165:2)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at /home/runner/invalidlatin/index.js:1:17
at Script.runInContext (vm.js:131:20)

Code

const base64  = require("base-64") ;

const str= "Những hình dạng của kinh tế hậu COVID-19 - Tuổi Trẻ Online";

console.log(base64.encode(str))

Error Example:
https://repl.it/@SoubhikChatterj/invalidlatin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions