ini icon indicating copy to clipboard operation
ini copied to clipboard

[BUG] \\ becomes \.

Open ddff12 opened this issue 4 years ago • 2 comments

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. 

ddff12 avatar Oct 29 '19 11:10 ddff12

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

butakovmv avatar Feb 18 '20 16:02 butakovmv

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.

m417z avatar Mar 17 '22 21:03 m417z

Duplicate of #30

wraithgar avatar Aug 17 '22 19:08 wraithgar