distal-attribute
distal-attribute
distal-attribute
distal-attribute

Problem Exporting Database with charset = Latin1 (spanish language)

hugob1 posted 4 years ago in Import/Export
I recently installed HeidiSQL (version 6 "stable") and found it to be a very good Mysql option... except with one little thing... My database has Latin1 accented characters (Spanish Language)... My Question: is there a way to configure HeidiSQL to be able to Import/Export or Dump my SQL database correctly? Last time I tried doing an Export Dump, I got weird characters placed instead of Spanish accented letters, since it is my belief that HeidiSQL only handles UTF-8 and NOT latin1...

How can I configure it to solve this issue?

Thanks!
ansgar posted 4 years ago
Should not be some problem. Please check that by importing this dump. It could easily be you're viewing the dump in some non-UTF-8 capable editor. Note that even if you have only Latin1 characters in that file, HeidiSQL always creates UTF-8 encoded files.
ansgar posted 4 years ago
Oh and I think you mix up things when you say "HeidiSQL only handles UTF-8 and NOT latin1" - all latin1 characters can be represented in an UTF-8 file, (not vice versa, but that's not the question here)
hugob1 posted 4 years ago
This is the whole story... I had used SQL Front 3.2 for quite a while, but lately it started to take several minutes for the program to be ready to access my Database, funny thing that in the 3 PC's I got that program installed, they all act like that... I assume it could be a problem of transfer speed with my server... So then, I started looking for options and found HeidiSQL, I tried it and I got the weird character I was telling you about earlier... And you are right... I made a Dump with HeidiSQL of one of my Tables, DELETED IT and then imported the SQL file and ran it... My HTML editor showed all Latin1 characters altered, but when I imported the Table and recreated it with HeidiSQL, I was able to view the Spanish Characters without NO problem. The funny thing that tricks me is that when I made an SQL Dump with SQL Front 3.2 I am able to view the Spanish Characters UNMODIFIED with the HTML editor.

Can you explain who this works?
ansgar posted 4 years ago
Your HTML editor does not detect UTF-8 files right which don't have a BOM - HeidiSQL creates BOM less UTF-8 files, SQL Front probably creates files with BOM. Some editors are not able to detect BOM less files, while most are.

hugob1 posted 4 years ago
Would it be easy to add the BOM capability to your program in the near future? So that exported SQL files can be read and viewed in standard HTML editors. The reason for this suggestion is that I am concerned about restoring the wrong SQL file back to my database and making a big mess of characters. Unless I stick to HeidiSQL which I assume it will do the trick as long as I import/export SQL dumps with your program which by the way I am starting to enjoy. One more thing, can HeidiSQL create graphics, pie charts and reports like Navicat? Congrats for all your fine work!
ansgar posted 4 years ago
The BOM was there, in the past, until I found mysql command line tools and many other applications display the BOM which is not the intention. So we will have to live with a few editors not being able to detect BOM less files. Although that's very weird nowadays - a HTML editor should definitely be able to read BOM less UTF-8 files. Which one is it? Is it up-to-date?

About your graphics question: no, HeidiSQL can't create graphics.
hugob1 posted 4 years ago
Thank you for your reply... The HTML editor I use is Cutehtml and Cuteftp since I feel very comfortable using them, but don't worry, the reason I use them is to check from time to time my SQL dumps and make sure all the records and tables have been successfully copied, but if you happen to know a better option please let me know the name of the HTML editor and where to find it. Once again thank you for all your help.
ansgar posted 4 years ago
Notepad is fine. Also, Notepad++, PSPad and UltraEdit work fine.

Please login to leave a reply, or register at first.