You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to echo a string with special characters in it (téstér) with the child_process.exec(command[, options][, callback]) .
stdout is returning t?st?r. As per instructions I added the {encoding: 'buffer'} which is returning the buffer value of <Buffer 74 82 73 74 82 72 0d 0a>. If I create a new Buffer object using let test = Buffer.from('téstér') I get back the value of <Buffer 74 c3 a9 73 74 c3 a9 72>.
Why are these returning different values? I'm about to decode the value from the Buffer.from object I create, with the special characters, but when I attempt to do the same to the stdout I still get the t?st?r value.
Am I doing something incorrect here? Any help would be greatly aprreciated.
Issues with third-party modules, npm, or other tools that use node, should be posted to the appropriate issue tracker for that project, unless it can be proven that the issue is in fact with node core and not the module/tool in question.
I'm attempting to echo a string with special characters in it (téstér) with the
child_process.exec(command[, options][, callback])
.stdout is returning
t?st?r
. As per instructions I added the {encoding: 'buffer'} which is returning the buffer value of<Buffer 74 82 73 74 82 72 0d 0a>
. If I create a new Buffer object usinglet test = Buffer.from('téstér')
I get back the value of<Buffer 74 c3 a9 73 74 c3 a9 72>
.Why are these returning different values? I'm about to decode the value from the Buffer.from object I create, with the special characters, but when I attempt to do the same to the stdout I still get the
t?st?r
value.Am I doing something incorrect here? Any help would be greatly aprreciated.
It seems the {encoding: 'buffer'} is treating the é as 82. Which is a linebreak according to this https://www.fileformat.info/info/unicode/char/0082/index.htm
The text was updated successfully, but these errors were encountered: