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

Unable to input chinese hanzi

lokki_4711 posted 8 years ago in General
I am new to all this but hoping to migrate an existing flashcard program for learning chinese hanzi (chinese characters) from MS-Access to mysql.

I just installed MySQL and HeidiSQL and was trying to familiarise myself with them by playing around and experimenting a little. I created a test table, with a couple of VARCHAR fields, but I cannot seem to input hanzi into these fields. I can see the character correctly in the input field when I type it in (or paste it in from somewhere else) but the moment I hit the "Post edit" button it converts to a question mark.

I read the couple of threads here about difficulties with cyrillic characters but I don't know enough about this to know if this is the same situation. I did try the command "SET NAMES 'utf8';" and "SET NAMES 'GB2312';'' (with and without the single quotes) without any visible change in behaviour. (I also tweaked the preferences by setting hanzi-capable fonts in SQL-Appearance and Data-Appearance)

I'd just like to know whether I am doing something wrong, and what, or if what I am hoping to do is basically impossible, and I have to go back and make do with MS-Access ?
lokki_4711 posted 8 years ago
Just an update on this: I installed phpMyAdmin and I am able to both input and visualise chinese characters there.

The characters, that I now know are actually there in the database, still show up as question marks in HeidiSQL and I'd still be interested to solve it here too, but at least it is not a show stopper for me any more and I can move forward with what I want to do.

I just have to remember to do all hanzi manipulations over the web interface while I can use HeidiSQL for other tweaks.
scendix posted 7 years ago
as we have a lot of data in chinese, japanese or other charsets, it's really annoying to be not able to use heidi with these tables.
so we always have to have a heidi and a phpMyAdmin open to edit our data.

any chance that heidi will be able to edit, export, transfer chinese, japanase, ... data as well??
rosenfield posted 7 years ago
I guess that 3 things are required:

1) Find replacement Delphi components that support Unicode.
Some have been found, for example the TntUnicode controls for standard controls, while others are missing, most prominently the data result grids, and the BLOB text editor. (The current BLOB text editor component is horrible in other ways too btw - breaks Unix/Mac newlines, malfunctions when it sees a NUL character. Would be awesome to get rid of it.)

2) Lots of testing afterwards to fix the actual code.
Strings need to be replaced with widestrings, probably a bunch of code that assumes ANSI needs to be fixed. Big task, but pretty easy to do as we go along. Users might help here by testing out a "unicode alpha release" or what not, the code could even branch into two sections of the source code repository so there's a stable ANSI version and a alpha/beta/etc Unicode version.

3) Developer incentive.
The current developers are AFAIK using only databases with characters in their own native language (corresponding to their Windows codepage) or in English, so they're doing fine with the ANSI version of HeidiSQL. They're naturally lacking motivation to engage in a task that they themselves benefit nada from, which is going to introduce breakage, and which might help out just as many users in the end as doing something else which would also benefit the developers in their daily work.

I think that sums it up. So it's really a matter of someone taking initiative and starting the whole thing, once the components have been replaced I'm sure that everything else will quickly fall into place.
LUTi posted 7 years ago
I believe Unicode (utf8) is becoming a defacto standard, and it must be supported. I can not say about Asian characters, but I am facing problems displaying quite common characters as for example [b:0d4f6b7a7a]
ansgar posted 7 years ago
Just a quick info: I'm working on switching to a unicode enabled datagrid in both Data + Query tabs. There are some (I think mainly two) features missing in the new grid which we used previously, so I will have to implement alternative solutions for them.
ansgar posted 7 years ago
First step is done: http://changes.heidisql.com/1138

Unfortunately Zeos doesn't seem to be fully unicode compatible, so we have to fix that too...
LUTi posted 7 years ago
Anse, thank you for the feedback (and, that you work on this issue). When can we expect some final version with what you've done up to now :?:
ansgar posted 7 years ago
It will take some time to be honest. The only broken thing is Zeos - it seems not to fully support Unicode. But as Zeos is the most interlocked component in HeidiSQL, it will be much effort to either make it unicode compatible or even replace it with an own component.

Any chance you could help with implementing a TDataset for MySQL? We have one half ready and some problems with pointer stuff in Delphi.

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