User forums > Using Code::Blocks
Need some help with source encodings
Grygoriy:
Hi
I'm using CB, and I need some help.
My source files' encoding is UTF-8.
CB is using UTF-8 without BOM, but VS 2005 supports UTF-8 with BOM only. So if I want to build my project under Windows using VS 2005, I got some trash symbols insted of russian ones. I think that VS uses BOM to differ UTF-8 source files' encoding from Ansi one. And when it begins compilation, it compiles files, assuming that encoding is ansi.. And i have some strange symbols as an output )
So can you suggest some elegant solution for this problem?
TDragon:
Edit->File encoding->Save byte-order-mark (BOM)
:D
Grygoriy:
You see, I want to store sources in UTF-8 without BOM, so maybe some scripting will help me.. I will attempt to add BOM during compilation, and then to remove it back..
But it's a little bit ugly solution ))
TDragon:
--- Quote from: Grygoriy on June 04, 2007, 10:07:54 pm ---You see, I want to store sources in UTF-8 without BOM, ...
--- End quote ---
Dare I ask why? If MSVC seems to expect it, why not use it?
Grygoriy:
It seems to me that UTF-8 without BOM just more universal, and BOM is not supported by some editors.
Am I wrong?
Navigation
[0] Message Index
[#] Next page
Go to full version