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

there is a character encoding issue. Could you please fix it? #80

Open
iamisti opened this issue Nov 29, 2019 · 4 comments · May be fixed by #84
Open

there is a character encoding issue. Could you please fix it? #80

iamisti opened this issue Nov 29, 2019 · 4 comments · May be fixed by #84

Comments

@iamisti
Copy link

iamisti commented Nov 29, 2019

js-irsdk: yaml error:
YAMLException: the stream contains non-printable characters at line 822, column 29:
UserName: Emircan Co�kun
^
(anonymous) @ JsIrSdk.js:421
processImmediate @ internal/timers.js:439
JsIrSdk.js:421

@iamisti
Copy link
Author

iamisti commented Dec 6, 2019

Apparently they already fixed that, so it should not show for the next release.
The only thing we need is a new release :)

@sabifa
Copy link

sabifa commented Mar 25, 2020

Any update on this? Just received the same error. It prevents the SessionInfo from being loaded, which breaks my app. Here is the msg:

[0] js-irsdk: yaml error: 
[0] YAMLException: the stream contains non-printable characters at line 2601, column 31:
[0]        UserName: MikoÅaj Szymonek
[0]                                   ^

or as an image:
image

@iamisti Did you fix it somehow? Looks like node-irsdk already uses the latest version of js-yaml (3.13.1)

@kenklin
Copy link

kenklin commented Mar 26, 2020

I've experienced this as well with the latest npm install "node-irsdk": "^2.1.6"

js-irsdk: yaml error:
YAMLException: the stream contains non-printable characters at line 1455, column 29:
UserName: Ond�ej Hašlar
^
image

BTW, node-irsdk is just the right level of data access for me. Nice work.

@sabifa
Copy link

sabifa commented Mar 31, 2020

Strangely enough, if I enter the names into a yaml file like that:

UserName: Emircan Co�kun
UserName2: MikoÅaj Szymonek
UserName3: Ond�ej Hašlar

and parse them with js-yaml (3.13.1) like so:

const yaml = require("js-yaml");
const fs = require("fs");

try {
  const doc = yaml.safeLoad(fs.readFileSync("test.yml", "utf8"));
  console.log(doc);
} catch (e) {
  console.log(e);
}

It works without any problem and prints the expected result:
image
So I guess that there is an invisible char that can't get parsed. I don't really know how to debug that problem though.. Is there a way to save the telemetry file before parsing? That way we could maybe actually see the char which causes the problem.

@apihlaja Any clue on this?

kenklin added a commit to kenklin/node-irsdk that referenced this issue Apr 15, 2020
@kenklin kenklin linked a pull request Apr 15, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants