Bug #7387 "Auto-Detect Char set" on restore doesn't work/fails
Submitted: 17 Dec 2004 17:21 Modified: 14 Mar 2005 19:07
Reporter: mike wilson Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.18 OS:Windows (XP Home SP2)
Assigned to: Victor Vagin CPU Architecture:Any

[17 Dec 2004 17:21] mike wilson
Description:
I'm trying to restore a back up file from MySQL 4.0.18 into 4.1.8
the default encoding is set utf8 and I click the "Auto-Detect Character set" button on the "Restore" section.
It pops up with a message Box 
"Unseccessful
Could not determine the charcter set of this file"

All well and good, but the file's encoding is latin1.

Seems like you should be able to Auto-detect latin1, which is probably the main char set besides utf8 that people would back up in.

How to repeat:
click the "Auto-Detect Character set" button on the "Restore" section
back up file is in latin1
you will get message box described above
[17 Dec 2004 17:29] mike wilson
the version on Admin is 1.0.18 not 4.0.18 , opps

mike w.
[19 Dec 2004 16:56] mike wilson
changed version from 4.0.18 to 1.0.18
[5 Jan 2005 14:05] mike wilson
to get a file that will cause this error see download instructions for bug#7385
[14 Mar 2005 19:07] Michael G. Zinner
The problem to this is, that is is very hard to auto-detect the charset from a given file without scanning the complete file. The file may start with latin1 chars only but then, later in the file, utf8 chars appear.

The auto-detect function can just "guess" the charset. And it can detect the SET NAMES command in the beginning of the file. If this is not present, it will not work.

Therefore I would suggest always to use utf8 for any backup since it produces no overhead for latin1 characters and is absolutly safe for any other characters, too.