Page 1 of 1

changed encoding

Posted: 26.07.2024 03:38
by cydonia
I have 2 related questions in relation to encoding:

- In cudatext version 1.214.6 I generally use cp1252 encoding however occassionally when I reopen a file previously saved as encoding cp1252 it reopens as UTF-8.
Likewise if a file is being edited in cudatext with encoding cp1252 has either a unicode character typed or text containing unicode characters pasted and then saved it immediately prompts with "Could not save file because encoding "cp1252" cannot handle unicode text. Program has saved file in UTF-8 encoding" with only an OK button and then converts to UTF-8
Would it be possible for the prompt to include a cancel button?

- Would it be possible to have an option to lock/force default encoding so that similar to other text editors if any characters typed or pasted that are not supported in the current encoding they appear as questions marks?

Re: changed encoding

Posted: 26.07.2024 06:30
by main Alexey
attach small file example (the smaller the better). text in cp1252 which shows the error "Could not save file because encoding "cp1252" cannot handle unicode text. Program has saved file in UTF-8 encoding"
>>Would it be possible to have an option to lock/force default encoding so that similar to other text editors if any characters typed or pasted that are not supported in the current encoding they appear as questions marks?
sorry, Cud don't check new chars for encoding, it allows all unicode range. and only on OPENING/SAVING it checks chars. it's not easy to add.

Re: changed encoding

Posted: 28.07.2024 14:13
by cydonia
So would it be possible for the prompt to include a cancel button to prevent it saving as UTF-8?

Re: changed encoding

Posted: 28.07.2024 14:17
by main Alexey
file has chars out of current codepage.
if we cancel saving to utf8, we must save to some other encoding which includes all chars present in the file. possible here are: utf8, utf16, utf32. not possible: cp12XX. only good case is utf8.