Need option to disable code page warning

Ideas for new features

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
bhami
Posts: 7
Joined: Mon Dec 21, 2009 4:29 am
Contact:

Need option to disable code page warning

Post by bhami »

I have some Russian (Cyrillic alphabet) words in one of my files. Whenever I save the file, I get an obnoxious "Warning: some characters cannot be converted to code page 1252..." message which takes a couple of clicks to dismiss. TextPad needs a way for the user to be able to disable this warning either globally or on a per-file basis.
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Code page 1252 (Win-latin-1) does not contain Cyrillic characters; those characters cannot be saved in that character encoding.

If your document contains
�ŸÑ€�¸�²�µÑ‚ �¼�¸Ñ€
(Unicode: U+041f U+0440 U+0438 U+0432 U+0435 U+0442 U+0020 U+043c U+0438 U+0440)
(CP 1251: 0xcf 0xf0 0xe8 0xe2 0xe5 0xf2 0x20 0xec 0xe8 0xf0)
and you save it as "ANSI", ignoring the warning, the result is a document that contains
?????? ???
(ASCII: 0x3f 0x3f 0x3f 0x3f 0x3f 0x3f 0x20 0x3f 0x3f 0x3f).

You seem to be suggesting that if your document contains characters that cannot be represented in the encoding you've chosen to save it in, and that you are therefore about to corrupt your document, the editor should not warn you.

Why would you want that behaviour?

Of course, you shouldn't have to enter two keystrokes (or two mouse clicks) rather han one to override the warning, but that is another matter.
User avatar
AmigoJack
Posts: 482
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Codepage 1251 is able to store Cyrillic, 1252 not. Are you even aware of what you want to do and what you actually do instead?
  1. in TextPad's window menu select "File", then "Save as..." (or press F12)
  2. in the Save dialog: in the combobox "Encoding" select entry "More..."
  3. click the dialog's "Save" button
  4. in the new dialog "Select the Code Page" select the entry "Cyrillic (Windows) - 1251"
  5. click button "Ok"
This is what you should do, if you prefer ANSI over Unicode. Tested as per TextPad 8.1.2.
bhami
Posts: 7
Joined: Mon Dec 21, 2009 4:29 am
Contact:

Post by bhami »

Thanks, AmigoJack! I was not familiar with those options.
Post Reply