base64 icon indicating copy to clipboard operation
base64 copied to clipboard

Error when trying to encode Vietnamese chars

Open soubhikchatterjee opened this issue 4 years ago • 0 comments

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

soubhikchatterjee avatar May 19 '20 08:05 soubhikchatterjee