Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] \\ becomes \. #91

Closed
ddff12 opened this issue Oct 29, 2019 · 3 comments
Closed

[BUG] \\ becomes \. #91

ddff12 opened this issue Oct 29, 2019 · 3 comments

Comments

@ddff12
Copy link

ddff12 commented Oct 29, 2019

config.ini

path= \\server\test\001
let config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))

 // config.path → "\server\test\001"
 //  There is only one ’\’ at the beginning of the character.
// But there are two correctly. 
@butakovmv
Copy link

butakovmv commented Feb 18, 2020

It is not bug of this package, it is feature of JavaScript.
Try it: console.log("\\");
It'll output \
Details is here: https://www.w3schools.com/js/js_strings.asp, see "backslash escape character"

Issue should be closed or edited

@m417z
Copy link

m417z commented Mar 17, 2022

You can try my fork, ini-win, which aims to be more compatible with the way Windows handles ini files. Windows doesn't do any unescaping when reading the values, and so does my fork, so it fixes this issue.

@wraithgar
Copy link
Member

Duplicate of #30

@wraithgar wraithgar marked this as a duplicate of #30 Aug 17, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants