mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
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>