Files
bun.sh/test/regression
Claude Bot 5571f5033e fix(transpiler): preserve unicode characters in string literals (#25169)
Unicode characters in BMP range (≤ U+FFFF) are now preserved in
transpiled output instead of being escaped to \uXXXX sequences. This
fixes Function.toString() returning escaped unicode, which broke tools
like unplugin-vue-router that rely on reading source code from function
bodies.

Changes:
- js_printer.zig: Use ascii_only=false for string character printing
- VirtualMachine.zig: Detect non-ASCII UTF-8 and use cloneUTF8 instead
  of treating bytes as Latin-1
- ModuleLoader.zig: Use cloneUTF8 for proper UTF-8 handling

Note: Supplementary characters (> U+FFFF like 🎉) are still escaped as
surrogate pairs due to JSC's UTF-16 string storage. This is a known
limitation.

Closes #25169

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 10:42:55 +00:00
..