Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot assign to read only property '1' of string ' #85

Open
wellenChen opened this issue Mar 13, 2023 · 5 comments
Open

TypeError: Cannot assign to read only property '1' of string ' #85

wellenChen opened this issue Mar 13, 2023 · 5 comments

Comments

@wellenChen
Copy link

const buffer = fs.readFileSync(path);
const encodingResult = jschardet.detect(buffer);
console.log(encodingResult.encoding);

@ThejasJainMJ
Copy link

I am also facing same issue. While detecting encoding type like SHIFT_JIS and EUC_JP i am getting this error. But this was working in angular 11 and typescript version 4.0.3. After updating to angular 14 and typescript version to 4.7.4 facing this issue.
image

@YLeventhal
Copy link

@wellenChen this might be solved/related to this issue which had a fix merged but not released
#68

@GreatAuk
Copy link

@morremeyer
Copy link

@GreatAuk I tried to use the package you linked, but it does not support ISO encoding at all.

@vizonluo
Copy link

Suggest to use https://www.npmjs.com/package/chardet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants