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.