tapmodo / node-ldif

Nodejs LDIF (LDAP Data Interchange Format) parser based on RFC2849
9 stars 7 forks source link

Library is not unicode conform #8

Open ptusch opened 6 years ago

ptusch commented 6 years ago

Hi,

the library doesn't understand unicode letters and fails horrible if characters outside of ASCII are used. I tested with with the letters: ß, and .

The problem is that the assigned RFC only seems to specify ASCII. Real LDAP Server are made up of various RFC and extend every time. So this library should either implement the ext RFCs as well, or write something at the top of the readme to only be able to parse ASCII letters.

The errormessage is rather criptic:

SyntaxError: Expected end of input or entry but "\u20AC" found.
    at peg$buildException (/home/minime/code/work/my_cool_project/node_modules/ldif/lib/parser.js:416:14)
    at Object.peg$parse [as parse] (/home/minime/code/work/my_cool_project/node_modules/ldif/lib/parser.js:2628:13)
    at Object.parseFile (/home/minime/code/work/my_cool_project/node_modules/ldif/index.js:13:17)
    at Object.<anonymous> (/home/minime/code/work/my_cool_project/sample_ldif.js:12:6)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)