Good day. A sql file in ansi encoding opens and edits normally, but when you save it, it is always saved in utf 8. Is it possible to leave the encoding unchanged when saving a file, or add an encoding selection option to the save dialog?
file encoding is not saved when saving
It makes no difference to which server you are connected.
I already did what you did - probably with some significant difference, not sure. Here's what I did:
- create an ANSI .sql file with Notepad++, with german umlauts in it: äöüÄÖÜß
- loaded that file in HeidiSQL and selected ANSI in the encoding drop-down (like in above screenshot)
- modified the content in HeidiSQL, with some more umlauts
- reloaded in Notepad++ and saw it still says ANSI encoding
Please note you must select ANSI encoding if it shouls be kept. Anything else including the auto-detect will result in UTF-8 in most cases. Also make sure your file has critical characters like german umlauts or whatever. Only if it contains such characters you can reliably differentiate between ANSI and UTF-8.
- I have a file - opaopa_before.sql in ANSI encoding (see picture 1-file_before_open).
- I open it in HeidiSQL in ANSI encoding (see picture 2-open_in_ansi_option and 3-before_updating).
- I edit it in HeidiSQL (see picture 4-after_updating).
- I save it in HeidiSQL and it is automatically saved in UTF 8 encoding (see picture 5-file_after_editing_and_saving and file opaopa_after.sql)
3 attachment(s):
Selected encoding is kept for tab files, but I just see I did that after the v12.10 release, for issue #2064. Please update to the latest build and try again.
Please login to leave a reply, or register at first.

