Bug #24448 Saving
Submitted: 20 Nov 2006 23:25 Modified: 21 Nov 2006 17:35
Reporter: Karsten Wutzke Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Query Browser Severity:S4 (Feature request)
Version:1.2.4. Beta OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any
Tags: ansi, bom, character encoding, Ctrl-S, Saving files, UTF-8

[20 Nov 2006 23:25] Karsten Wutzke
Description:
When opening files, the character encoding must be specified. Should be detected.

On opening files the default character encoding is UTF-8. Most users (like myself) overlook this combo box. From a user perspective, it is not relevant to know a file's character encoding.

Any ANSI encoded (Windows systems default) file with Umlauts etc. and opened with the wrong character encoding display wrong. Modifying an ANSI-encoded, but UTF-8 opened file back to disk via "Save" menu item or Ctrl-S results in an UTF-8 file.

This is not the desired behavior. The editor should detect the file's character encoding. When saving the file back, it should stay the same.

If the user wants to change the character encoding, s/he should use the "Save As..." dialog where the default encoding should also default to the current file's encoding. Like this the character encoding of the files a user works on have the same character encodings.

I had some strange errors on the MySQL client, because I was using ANSI and UTF encoded files without knowing...

How to repeat:
Open an ANSI-encoded file, the open dialog should default to "UTF-8 encoded file" encoding. Now make some change to the file and press Ctrl-S. Voila, here's your UTF-8 encoded file which used to be ANSI. The file now has a BOM (byte order mark) at the start of the file which confuses (e.g.) the MySQL client (errors).

Suggested fix:
The editor should detect the file's character encoding. When saving the file back, it should stay the same.

If the user wants to change the character encoding, s/he should use the "Save As..." dialog where the default encoding should also default to the current file's encoding. Like this the character encoding of the files a user works on have the same character encodings.
[20 Nov 2006 23:27] Karsten Wutzke
Tags adjusted.
[21 Nov 2006 17:35] Valeriy Kravchuk
Thank you for a reasonable feature request.
[13 Mar 2014 13:35] Omer Barnir
This bug is not scheduled to be fixed at this time.