Menu

#1148 Encoding mismatch when using split view

Next_Nightly
fixed
None
Bug_Report
2021-12-01
2021-10-25
No

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.

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2021-10-25

    Can you test the attached patch?

     
  • Gerard DURAND

    Gerard DURAND - 2021-10-25

    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
  • Miguel Gimenez

    Miguel Gimenez - 2021-10-25

    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

    That is a different issue, and IMHO it should have its own ticket.

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-01
    • assigned_to: Miguel Gimenez
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-01
    • status: open --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-01

    Fixed in r12540

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.