Unicode characters bug in table comments

LONGMAN's profile image LONGMAN posted 8 years ago in General Permalink
Unicode characters in table comments not shown correctly. Changing font from preferences won't fix it.

Ubuntu 15.10
HeidiSQL 9.3.0.4984 (wine)
1 attachment(s):
  • Screenshot-from-2015-10-28-17-40-53
[expired user #9375]'s profile image [expired user #9375] posted 8 years ago Permalink
same problem here
ansgar's profile image ansgar posted 8 years ago Permalink
I don't see any table comment there, the field is empty. But I guess you know there is one and HeidiSQL just does not display it?

* Which MySQL version is it?
* What's the output of the SHOW CREATE TABLE `resume_additional_fellowships`?
LONGMAN's profile image LONGMAN posted 8 years ago Permalink

I don't see any table comment there, the field is empty. But I guess you know there is one and HeidiSQL just does not display it?

* Which MySQL version is it?
* What's the output of the SHOW CREATE TABLE `resume_additional_fellowships`?


Sorry, I mean table field commentd. Look at any fields comment column. There is unicode strings, but shown as squares
ansgar's profile image ansgar posted 8 years ago Permalink
Ah ok, didn't see that.

Not sure, but that could be a Wine issue. Could you please post a CREATE TABLE query here, so I can try to reproduce on Windows?
LONGMAN's profile image LONGMAN posted 8 years ago Permalink

Ah ok, didn't see that.

Not sure, but that could be a Wine issue. Could you please post a CREATE TABLE query here, so I can try to reproduce on Windows?


Sure. I will post it tomorrow, now I'm writing with mobile device.
By the way, maybe it will help in detecting of issue: same squares shown in unicode table data, but if we change font in preferences from default (I dont remember name) to DeJaVu Sans Mono unicode symbols shown correctly
LONGMAN's profile image LONGMAN posted 8 years ago Permalink
This is CREATE TABLE:
CREATE TABLE `resume_additional_fellowships` (
`resume_id` INT(11) UNSIGNED NOT NULL,
`type` TINYINT(1) UNSIGNED NOT NULL COMMENT 'გრანტის ტიპი: 1 - კვლევითი, 2 - სასწავლო და 3 - სხვ. ',
`org_name` VARCHAR(255) NOT NULL COMMENT 'გამცემი ორგანიზაციის სახელწოდება' COLLATE 'utf8_unicode_ci',
`date_start` DATE NOT NULL COMMENT 'მიღების და დასრულების თარიღები',
`date_end` DATE NOT NULL COMMENT 'მიღების და დასრულების თარიღები',
`cofinansist` VARCHAR(255) NOT NULL COMMENT 'თანადამფინანსებელი' COLLATE 'utf8_unicode_ci',
INDEX `resume_id` (`resume_id`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
ROW_FORMAT=COMPACT
;
ansgar's profile image ansgar posted 8 years ago Permalink
Definitely looks like a font issue. I can see the above characters in the columns list, like in the attached screeny.

Note: In Tools > Preferences, you can set two different fonts. The first one on the "SQL" tab is for query tabs, when you write SQL code. The second one, on the "Text formatting" tab, is for result grids, e.g. on the "Data" tab and on the result of a "Query" tab. Both settings do not affect the GUI font, which is - for example - used in the table structure tab for column comments.

For the GUI font, HeidiSQL retrieves the font name + size per system call to SystemParametersInfo(SPI_GETICONTITLELOGFONT)

This seems to be supported by Wine. However, I don't know nothing about fonts on Linux. The returned font may not support all utf-8 characters.

What I could do is add a debug message to HeidiSQL's log panel, which displays the name of the font returned by SystemParametersInfo. This way you can probably find a way to set a different system font for Wine.
ansgar's profile image ansgar posted 8 years ago Permalink
Naah, forgot the screeny...
1 attachment(s):
  • utf8-column-comments
LONGMAN's profile image LONGMAN posted 8 years ago Permalink
Can you add feature for customizing GUI fonts too?
ansgar's profile image ansgar posted 8 years ago Permalink
Well, why not. I recall there were other users asking for a GUI font.
ansgar's profile image ansgar posted 8 years ago Permalink
... for a GUI font setting.
ansgar's profile image ansgar posted 8 years ago Permalink
I have the GUI font setting almost ready for committing. However, all the menus (main menu and all context menus) ignore this setting. All other components seem to work with a custom font. Looks quote ugly with certain fonts of course, but that's what the user is responsible for.
LONGMAN's profile image LONGMAN posted 8 years ago Permalink

I have the GUI font setting almost ready for committing. However, all the menus (main menu and all context menus) ignore this setting. All other components seem to work with a custom font. Looks quote ugly with certain fonts of course, but that's what the user is responsible for.


Thanks a lot. When will be released new version with custom font?
ansgar's profile image ansgar posted 8 years ago Permalink
I think this evening, if I'm back home early enough from school due to some French stuff in my daughter's class.
Code modification/commit from ansgarbecker, 8 years ago, revision 9.3.0.5002
Introduce GUI font preferences setting, so the user can customize the font of all dialogs and forms. Does not work with menus, however. See http://www.heidisql.com/forum.php?t=19666
ansgar's profile image ansgar posted 8 years ago Permalink
Just done in r5002
thecotne's profile image thecotne posted 7 years ago Permalink

i have come up with better solution

TL;DR; just install Sylfaen

as shown here [can't posts link]

fallback font for Georgian characters is Sylfaen

but because Sylfaen is not free [can't posts link]

(it costs $49 [can't posts link] )

it is not included with wine

so all you need is to buy Sylfaen or just download from torrent sites or copy from windows installation

and install on your system

(here is how [can't posts link] )

and for some reason i can't posts links so ...

(i need some more posts to do that? WTF?)

ansgar's profile image ansgar posted 7 years ago Permalink

That's a spam protection, which is quite useful, believe me. There are many forum spammers registering here and attempting to post some backlinks for SEO or whatever reasons.

Anyway your reply came a bit late, and it is definitely not a good solution to buy a font for this issue, or even download something illegally.

thecotne's profile image thecotne posted 7 years ago Permalink

i think it's better solution because it fixes wine itself so other programs also behave in correct way

about buying and download something illegally

it is possible to add some replacement font for Sylfaen (by tweaking registry)

or use fontforge or something to just change some font's font family to Sylfaen and install it on system (so you don't need to learn how to edit registry in wine to register replacement font)

that illegally thing happens to be easiest solution

_

also about being late on this

i just wanted to post why this happens in first place and how to fix wine (so it get fixed for other programs as well)

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