Visitar URL original
Error - Cannot read property 'isEncoding' of undefined · Issue #18 · nodejs/string_decoder · GitHub
The Wayback Machine - https://web.archive.org/web/20200916024745/https://github.com/nodejs/string_decoder/issues/18
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

Error - Cannot read property 'isEncoding' of undefined #18

Open
Vartex05 opened this issue May 12, 2020 · 1 comment
Open

Error - Cannot read property 'isEncoding' of undefined #18

Vartex05 opened this issue May 12, 2020 · 1 comment

Comments

@Vartex05
Copy link

@Vartex05 Vartex05 commented May 12, 2020

Hi, iam trying to use iconv-lite library in my ionic5 app, but when i tried to encode some string i get this error:
core.js:6014 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'isEncoding' of undefined TypeError: Cannot read property 'isEncoding' of undefined at Object../node_modules/string_decoder/lib/string_decoder.js (string_decoder.js:29) at __webpack_require__ (bootstrap:84) at Object../node_modules/iconv-lite/encodings/internal.js (internal.js:49) at __webpack_require__ (bootstrap:84) at Object../node_modules/iconv-lite/encodings/index.js (index.js:6) at __webpack_require__ (bootstrap:84) at Object.getCodec (index.js:65) at Object.getEncoder (index.js:117) at Object.encode (index.js:22) at PrintService.testEncode (print.service.ts:26) at resolvePromise (zone-evergreen.js:797) at zone-evergreen.js:862 at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:39680) at ZoneDelegate.invokeTask (zone-evergreen.js:390) at Zone.runTask (zone-evergreen.js:168) at drainMicroTaskQueue (zone-evergreen.js:559) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:469) at invokeTask (zone-evergreen.js:1603) at HTMLElement.globalZoneAwareCallback (zone-evergreen.js:1629)

This looks like a problem with unknown encoding, but i call it correctly:
iconv.encode('test','cp852')

Any ideas why this happens? Iam using ionic 5 with angular 8. It seems that it have something to do with string decoder.

@mcollina
Copy link
Member

@mcollina mcollina commented May 12, 2020

I'm not really a Ionic 5/Angular 8 expert, so I do not know how to help.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.