On windows, I use an utf-8 encoding for my cpp files, because I use accentuated characters in wxwidgets and/or cout/printf . I also want to share some code with Linux where utf-8 is more standard. It's why I use utf-8 encoding.
When I open a file in a project, C::B detects correctly the encoding. But, if I want to split the view, C::B changes the encoding displayed at the bottom to Windows-1252 in both sub-windows. So, If I do some modifications in my code, the modified file is saved with that encoding, not the original one (utf-8).
I have found a workaround to this problem in "Settings/Editor/General Setting/Encoding settings" by choosing UTF-8 in "Use encoding when opening files" instead of the default Windows-1252 for me.
I think it's a bug, because my file is not new and it is correctly detected as utf-8 when it is opened in a single window. The problem only appears when splitting the window on an already opened file.
Can you test the attached patch?
It's OK when you split the view, encoding does not change now, even if it's not the default encoding.
Nevertheless, when you change the encoding by "Settings/Editor/General Setting/Encoding settings" on an already opened/displayed file, even if it's not splitted, the encoding indicated at the bottom changes. So, when you save a modified file, the encoding may be changed.
Last edit: Gerard DURAND 2021-10-25
That is a different issue, and IMHO it should have its own ticket.
Fixed in r12540