-
Notifications
You must be signed in to change notification settings - Fork 847
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
Windows: incorrect encoding on Unicode output #548
Comments
ohhhh wow ok - we need to cater to full unicode this will slow things down, if it causes significant overhead we might have to add an "international" option with a documented perf hit |
oooor.. maybe we can use a post-processor to re-encode |
no import pino from 'pino';
const dest = pino.extreme();
const logger = pino(dest);
setInterval(() => logger.flush(), 10000).unref();
export default logger; |
it might be due to the fact you're transpiling your server try
|
or otherwise I'm seeing that the output is being escaped, so something is processing the output closing for now, as this doesn't seem like a problem with Pino |
Oh boy. How has this not come up before? To be JSON spec compliant we should be outputting UTF-8 strings. I'm not seeing anything in the language spec that that dictates how strings are to be encoded -- https://tc39.github.io/ecma262/#sec-text-processing . But this article implies that they could be UTF-16, and a comment to it indicates they could very well be merely ASCII, -- https://kev.inburke.com/kevin/node-js-string-encoding/ Regarding the problem, I suspect it has to do with the encoding of the destination. So if |
this is only apparent in Windows |
The thing is |
Turns out it's a known limitation of Node.js. Running I propose we just document this behavior in the pino website https://getpino.io/#/docs/help. |
Thanks @refack in nodejs/node#24550 (comment). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I try to log
logger.info(`Сервер запущен по адресу:')
but see in log
The text was updated successfully, but these errors were encountered: