LiveKit Logger Corrupts Hebrew Text in Node SDK

I’m seeing what appears to be a Hebrew encoding issue with LiveKit’s logger in the Node SDK.

I’m listening directly to UserInputTranscribed:

session.on(voice.AgentSessionEventTypes.UserInputTranscribed, (event) => {
  logger.info(event.transcript);
  console.log(event.transcript);
});

For the exact same event.transcript, console.log prints correct Hebrew, while logger.info outputs mojibake/corrupted characters. The UserInputTranscribed event exposes the transcript directly, so this seems isolated to logging rather than STT.

This is reproducible in the test project, and doesn’t appear to be a PowerShell/terminal encoding issue.

agent-starter-node-hebrew.zip (78.8 KB)

Thanks for the detailed report, the repro with both loggers side by side made this quick to pin down.

Good news: your transcript isn’t being corrupted. The event.transcript string is correct all the way through; what differs is how each call gets bytes onto the Windows console.

This seems to just be an issue in the dev console on Windows. You are not seeing it on a prod env right?

Thanks for the response.

Could you please elaborate on that difference? Is there any way to solve this?

Correct. On my prod env readable Hebrew is logged to datadog.

I’ve filled an issue with the agent team to fix it so it works in Windows console.

Sounds good, thanks.

I just happened to notice this PR that is in the works for this:

Keep an eye three for its progress.

Great, thanks for the update.