Korean comments in code sometimes turn into special symbols when applied

SCR-20241123-ukaw-2

I encountered a bug in Cursor where Korean comments in the code are sometimes replaced with strange symbols after applying changes. Interestingly, this does not happen in all cases, but under specific circumstances, parts of Korean comments that are unrelated to the applied changes are affected. Please refer to the attached screenshot for an example.

If the issue is on Cursor’s side, it might be addressed in a future update, I hope.

If the problem originates from the LLM model, I think there are two things you may try for now:

  1. Specify UTF-8 encoding in your files (HTML or JavaScript I guess) by adding the charset attribute, and ensure the files are saved with UTF-8 encoding.
  2. In Cursor Settings, add a prompt to the ā€˜Rule for AI’ section, such as: ā€œRetain all Korean comments in their original form.ā€ This will encourage the model to preserve Korean comments during code generation.

this problem exist already 1 year and still not fixed, I will try hotfix but strange they can’t fix it so long, problem with any other language than english.

SCR-20241219-ulot-2

This issue is still occurring as of December 19, 2024, on Version 0.44.3.
This issue is particularly annoying because, when editing or composing documents in Chat or Composer, even for simple code additions, I have to manually verify whether Cursor has unintentionally altered the existing code into special characters.

1 Like

Can confirm it’s happening.

Still occurring on v0.44.8 in Chinese.

This issue hasn’t occurred since version 0.48. It seems to have been resolved.