Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Can project has a "encoding" property?
Jenna:
--- Quote from: MortenMacFly on August 23, 2009, 03:24:45 pm ---
--- Quote from: jens on August 23, 2009, 01:09:35 pm ---Fixed in svn r5737
--- End quote ---
...including the removal of the System Locale as fallback?! IIRC we has re-implemented this because for many users this was the only working solution. Stay tuned that we'll receive the same complaints again, now. What's wrong with trying the system locale? I mean: It's a wx function that usually works just fine...?!
--- End quote ---
No !
I only changed the behaviour, if the text was detected as pure (7-bit) ascii.
In this case we should not use the system-defrault, but the encoding, the user has chosen as default to open files.
Pure ascii-texts can be opened with any encoding, so it's not a problem.
The fallback to system-default, happens in ConvertToWxStr.
Jenna:
--- Quote from: mariocup on August 23, 2009, 03:12:28 pm ---Hi Jens,
I am working under windows and the system default is CP1252. I have configured in the CB editor UTF-8 for opening files and if I create a File->New->Class and save the files then the status bar shows UTF-8 encoding for these files too.
--- End quote ---
I tested in under both linux and windows, in both cases, I get a file in sytem-encoding (cp1252) instead of the encoding I chose in the editor-settings (utf-8).
That's a wrong behaviour in my opinion.
If we give the user the possibility to chose his preferred encoding for opening files, we should respect it (if possible), not only as fallback, but also as default for files that can be saved in (aömost) any encoding.
nanyu:
--- Quote from: jens on August 23, 2009, 01:09:35 pm ---Fixed in svn r5737
--- End quote ---
thanks you!
mariocup:
--- Quote from: jens on August 23, 2009, 03:45:19 pm ---
--- Quote from: mariocup on August 23, 2009, 03:12:28 pm ---Hi Jens,
I am working under windows and the system default is CP1252. I have configured in the CB editor UTF-8 for opening files and if I create a File->New->Class and save the files then the status bar shows UTF-8 encoding for these files too.
--- End quote ---
I tested in under both linux and windows, in both cases, I get a file in sytem-encoding (cp1252) instead of the encoding I chose in the editor-settings (utf-8).
That's a wrong behaviour in my opinion.
If we give the user the possibility to chose his preferred encoding for opening files, we should respect it (if possible), not only as fallback, but also as default for files that can be saved in (aömost) any encoding.
--- End quote ---
I tested it with the cc_completion branch and there CB behaves like you are saying. But I tried it with a former CB revision 5463, which I am using too, and in this version CB behaves like I described before.
Jenna:
--- Quote from: mariocup on August 23, 2009, 06:44:38 pm ---I tested it with the cc_completion branch and there CB behaves like you are saying. But I tried it with a former CB revision 5463, which I am using too, and in this version CB behaves like I described before.
--- End quote ---
That's why they behave different, 5463 was before the wxAuiNotebook merge and some parts of the encoding-detection behave different there.
For some reasons (don't ask me why), I decided to use system-default for pure ascii.
That was the wrong (or at least not best) way, as I think today.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version