-
Notifications
You must be signed in to change notification settings - Fork 8
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
Chokes on special characters #1
Comments
I glanced at the code, I guess its just because this regex doesn't care about non-English characters: I think the solution is to use ES2018 unicode property escapes. |
I'm looking into it, but so far I think the issue is different, in quoted values there can theoretically be anything inside (qval), only unquoted ones have the limitations to their contents applied (val) (though I'll also see if that doesn't need to be adjusted). I did try to reproduce the issue, but couldn't with both inline and from-file reads: Inlinelet a = VDF.parse('"3" "DMR ALİ"');
console.log(a);
console.log(VDF.stringify(a)); Result:
From filea.vdf (UTF-8):
import * as fs from 'fs';
let a = VDF.parse(fs.readFileSync("./a.vdf").toString());
console.log(a);
console.log(VDF.stringify(a)); Result:
I'd ask for the raw file that was parsed (not pastebinned, because the exact bytes/encoding used is important here) and the code that was used to read/parse it or some minimum reproducible example if you could get one. |
Btw I assume the line that you pasted is what was shown in the exact error, right?
|
I do have the raw file, should I email it to you? |
Or, I use Discord if you want to add me, Zamiel#8743. |
You should just be able to drag-and-drop a file to attach it here, I just tested and it seems to preserve the raw bytes/encoding |
It contains potentially sensitive information, like it has all of their steam friends and stuff, maybe I should do it over a side channel. |
I see, I sent a Discord invite then, maybe that will be the easiest |
Hello, any update on this? |
Hello, and thanks for the excellent library.
vdf-parser fails to parse one of my user's
localconfig.vdf
.It complains "invalid syntax on line 208".
Line 208 is equal to this:
So my guess is that vdf-parser is simply choking on the special characters.
Any chance for a fix?
The text was updated successfully, but these errors were encountered: