[BUG] Claude Code generates markdown files with non-ASCII Unicode characters that render as "gremlins"
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description: When Claude Code writes markdown (.md) files, it uses Unicode characters (emoji, smart quotes, special bullets, etc.) that cannot be properly rendered in many environments, appearing as corrupted "gremlin" characters instead. Environment:
OS: macOS (Darwin 24.6.0)
Claude Code Version: [Current version]
File Type: Markdown (.md)
Editor: Various (issue appears in multiple viewers)
Steps to Reproduce:
Ask Claude Code to create a comprehensive markdown document
Claude generates content with Unicode characters like:
✅ (U+2705 checkmark)
⚠️ (U+26A0 warning sign)
📅 (U+1F4C5 calendar emoji)
⭐ (U+2B50 star)
• (U+2022 bullet point)
→ (U+2192 arrow)
Smart quotes: " " ' ' (U+201C, U+201D, U+2018, U+2019)
Em/en dashes: — – (U+2014, U+2013)
Open the generated file in various viewers
Unicode characters appear as corrupted symbols or replacement characters (�)
Expected Behavior: Claude Code should generate markdown files using only ASCII-safe characters:
Use [x] and [ ] instead of ✅ and ⚠️
Use regular quotes " instead of smart quotes
Use - for bullets and lists instead of •
Use -> instead of → arrows
Use -- instead of em dashes
Use * instead of ⭐ for emphasis
Actual Behavior: Generated markdown contains non-ASCII Unicode characters that:
Don't render properly in many text editors
Appear as "gremlin" characters (corrupted symbols)
Require manual find/replace to fix (92+ instances in my case)
Violate basic markdown portability principles
Impact:
High: Documentation becomes unreadable without manual cleanup
Affects professional documentation quality
Requires significant time to fix manually
Inconsistent with markdown best practices
Suggested Fix:
Add a markdown generation mode that restricts output to ASCII-safe characters
Make this the default for .md files
Or add a setting in .claude/config to control Unicode usage in markdown:
{
"markdown": {
"useASCIIOnly": true
}
}
Example: Before (current - breaks):
Readiness Status:
- ✅ Ready: Yes
- ⚠️ Warning: Needs attention
- 📅 Timeline: 1-2 weeks
After (should generate):
Readiness Status:
- [x] Ready: Yes
- [ ] Warning: Needs attention
- Timeline: 1-2 weeks
Related: This aligns with standard documentation practices and the principle that markdown should be readable even as plain text. Workaround: Currently requires manual Python/sed scripts to replace all Unicode characters with ASCII equivalents.
Would you like me to:
Open the GitHub issues page for you?
Modify this bug report in any way?
Also add this as a documentation standard suggestion?
What Should Happen?
Create markdown file that render properly in Obsidian, VS Code (and likely many other platforms).
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce:
Ask Claude Code to create a comprehensive markdown document
Claude generates content with Unicode characters like:
✅ (U+2705 checkmark)
⚠️ (U+26A0 warning sign)
📅 (U+1F4C5 calendar emoji)
⭐ (U+2B50 star)
• (U+2022 bullet point)
→ (U+2192 arrow)
Smart quotes: " " ' ' (U+201C, U+201D, U+2018, U+2019)
Em/en dashes: — – (U+2014, U+2013)
Open the generated file in various viewers
Unicode characters appear as corrupted symbols or replacement characters (�)
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.2
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗