Skip to content

[BUG] Characters å,ä and ö are replaced with � when Claude Code edit files #7335

Description

@skuttli-daniel

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

I have the issue that when teh characters å, ä or ö exists in the source code files they are removed and replaced with a � when Claude Code edit these files.

What Should Happen?

I expect the characters å, ä and ö to be preserved when Claude Code are edit files.

Error Messages/Logs

Steps to Reproduce

  1. Start Claude Code
  2. Tell it to edit files with å, ä or ö
  3. Look at the files and the characters have been replaced with �

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.0.109

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

Activity

  1. github-actions commented on Sep 9, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Claude Code does not respect file encoding, corrupts Windows-1252 files #7134
    2. Character Encoding Handling Fails for WINDOWS-1252 ADVPL Files #3416
    3. Unicode/UTF-8 Character Corruption in Hook System #6246

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. dicksontsai commented on Sep 9, 2025

    @dicksontsai
    Collaborator

    How are you looking at the files? Are your source files in an encoding other than utf-8? The result of editing a file with å, ä, ö seems fine to me.

    > Edit @nordic_characters.txt to add more words with å, ä, ö
      ⎿  Read nordic_characters.txt (18 lines)
    
    ⏺ I'll add more Nordic words containing å, ä, ö to the file.
    
    ⏺ Update(nordic_characters.txt)
      ⎿  Updated nordic_characters.txt with 15 additions
            9    - kött (meat)
           10    - smörgås (sandwich)
           11    - björn (bear)
           12 +  - hör (hear)
           13 +  - kök (kitchen)
           14 +  - förstå (understand)
           15 +  - älg (moose)
           16 +  - träd (tree)
           17 +  - höst (autumn)
           18 +  - väder (weather)
           19 +  - röd (red)
           20 +  - gå (walk/go)
           21 +  - hålla (hold)
           22 +  - öppna (open)
           23 +  - stänga (close)
           24 +  - läsa (read)
           25 +  - högre (higher)
           26 +  - föräldrar (parents)
           27    
           28    Finnish examples:
           29    - päivä (day)
    
    ⏺ Update(nordic_characters.txt)
      ⎿  Updated nordic_characters.txt with 6 additions                                                       
           29    - päivä (day)
           30    - yö (night)
           31    - säätä (weather)
           32 +  - järvi (lake)
           33 +  - mäki (hill)
           34 +  - käsi (hand)
           35 +  - tähtitaivas (starry sky)
           36 +  - hyvää päivää (good day)
           37 +  - kiitos (thank you)
           38    
           39    These characters (å, ä, ö) are commonly used in Swedish, Finnish, and other Nordic languages.
           40   \ No newline at end of file
    
    
  3. dicksontsai commented on Sep 9, 2025

    @dicksontsai
    Collaborator

    Ah I see, this is on Windows + Windows Terminal. Seems related to #7332

  4. skuttli-daniel commented on Sep 10, 2025

    @skuttli-daniel
    Author

    How are you looking at the files? Are your source files in an encoding other than utf-8? The result of editing a file with å, ä, ö seems fine to me.

    > Edit @nordic_characters.txt to add more words with å, ä, ö
      ⎿  Read nordic_characters.txt (18 lines)
    
    ⏺ I'll add more Nordic words containing å, ä, ö to the file.
    
    ⏺ Update(nordic_characters.txt)
      ⎿  Updated nordic_characters.txt with 15 additions
            9    - kött (meat)
           10    - smörgås (sandwich)
           11    - björn (bear)
           12 +  - hör (hear)
           13 +  - kök (kitchen)
           14 +  - förstå (understand)
           15 +  - älg (moose)
           16 +  - träd (tree)
           17 +  - höst (autumn)
           18 +  - väder (weather)
           19 +  - röd (red)
           20 +  - gå (walk/go)
           21 +  - hålla (hold)
           22 +  - öppna (open)
           23 +  - stänga (close)
           24 +  - läsa (read)
           25 +  - högre (higher)
           26 +  - föräldrar (parents)
           27    
           28    Finnish examples:
           29    - päivä (day)
    
    ⏺ Update(nordic_characters.txt)
      ⎿  Updated nordic_characters.txt with 6 additions                                                       
           29    - päivä (day)
           30    - yö (night)
           31    - säätä (weather)
           32 +  - järvi (lake)
           33 +  - mäki (hill)
           34 +  - käsi (hand)
           35 +  - tähtitaivas (starry sky)
           36 +  - hyvää päivää (good day)
           37 +  - kiitos (thank you)
           38    
           39    These characters (å, ä, ö) are commonly used in Swedish, Finnish, and other Nordic languages.
           40   \ No newline at end of file
    

    The files are closed in UTF-8 and are .cs files and I definitely think this is related to #7332

  5. github-actions commented on Dec 8, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  6. github-actions commented on Jan 8, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  7. xrchz commented on Jan 12, 2026

    @xrchz

    Utter disgrace that this was closed without being solved.

  8. github-actions commented on Jan 20, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  9. locked as resolved and limited conversation to collaborators on Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions