Severe Code Encoding Issues When Using Cursor with Claude Models

Where does the bug appear (feature/product)?

BugBot

Describe the Bug

Hello Cursor Team,

I’m writing because I’m extremely frustrated with a persistent issue when using Cursor to generate code.

Recently, code generated by Cursor frequently contains garbled text or encoding errors. This happens specifically when I ask it to write code, and it occurs repeatedly. I have tested this with multiple models, including Claude Sonnet and Claude Haiku, and the problem remains the same.

This is not an isolated incident. It happens often enough that it seriously disrupts development. Generated code becomes unreadable or unusable, which defeats the entire purpose of using an AI coding assistant.

I upgraded to the Pro plan specifically to improve code quality and productivity. At this point, I have to ask: what exactly am I paying for if the output code is broken by encoding issues?

I would really like to understand:
• Why this encoding/garbling issue is happening so frequently
• Whether this is a known issue with Cursor’s integration or with specific models
• If there is any recommended configuration or fix on the user side
• And whether this issue is being actively addressed

Right now, this experience is extremely disappointing. I expect reliable, clean code output, especially as a paying Pro user.

I hope you can take this feedback seriously and provide a clear explanation or solution as soon as possible.

Steps to Reproduce

When I interact with the large language model and ask it to implement functionality, the code it generates often contains garbled text. In some cases, it even turns comments in existing code—comments that I never asked it to modify—into garbled characters. My development environment is set to Chinese.

Expected Behavior

Write code normally without producing any garbled text.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.44
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.1.0

For AI issues: which model did you use?

claude

For AI issues: add Request ID with privacy disabled

dc008193-7e2d-40f8-94d9-fd3ff249db2e

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue. A few users from China have reported the same thing since August 2024.

Related threads:

The pattern matches yours. The “��” characters show up in Chinese comments, even in existing code that wasn’t changed. It happens about 5 to 20% of the time, usually 1 to 2 characters at once.

There isn’t a reliable workaround right now, although one user mentioned that reapply sometimes helps. AI Rules don’t work with Composer.

I’ve passed this to the team. No timeline yet, but your report helps with prioritization. If there are updates, I’ll post them here.

Could you share a couple more request IDs if you see it again? That’ll help the investigation.

The exact same issue happens to me. for every time I ask the agent to modify the code, it seems to convert all the Chinese characters in the current file to garbled text first, then generate content based on that. For me this issue happened after a update this week

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.