FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Can you force Claude Code to use a fixed encoding / BOM?
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Can you force Claude Code to use a fixed encoding / BOM?
Posted: Wed Mar 25, 2026 09:11 PM

Hello friends,

I’ve been using Claude Code to generate files and ran into a question I haven’t fully solved yet:

Is there any way to consistently enforce a specific file encoding (e.g. UTF-8) and BOM setting (with/without BOM)?

From what I’ve seen, it usually does the right thing, but it’s not always 100% predictable—especially when it comes to BOM.

I’m curious:

  • Is there any hidden config or setting for this?
  • Or is it only controllable via prompts?
  • How do you make sure generated files are ALWAYS saved with the correct encoding?

Would love to hear how others are handling this.
Feels like something many people might be running into.

Thanks in advance—any insights appreciated!

Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Can you force Claude Code to use a fixed encoding / BOM?
Posted: Thu Mar 26, 2026 07:01 PM

I had a PowerShell script created – it works well and I can also extend it. If you're interested, I can post the source.

Continue the discussion