[Bug 42654] New: 3-byte utf8-charactes don't display
https://bugs.winehq.org/show_bug.cgi?id=42654 Bug ID: 42654 Summary: 3-byte utf8-charactes don't display Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: peter_laursen(a)webyog.com Distribution: --- Created attachment 57590 --> https://bugs.winehq.org/attachment.cgi?id=57590 Application cannot identify the glyphs for 3 byte utf8-characters - display as squares This is a snippet from a SQL-script. insert into `unitest`(`id`,`english`,`native`) values (4,'mandarin','官話'); insert into `unitest`(`id`,`english`,`native`) values (5,'thai','ไทย'); insert into `unitest`(`id`,`english`,`native`) values (6,'hindi','हिन्दी'); insert into `unitest`(`id`,`english`,`native`) values (7,'arabic','العربية'); (the origunal file is utf8-encoded) Thai, Hindi and Mandarin characters dont display in common Windows program such as Notepad++ (a text editor) and SQLyog (a MySQL client). In Windows it works fine with same programs and in same type of native Linux programs it also does with same fonts specfied (for instance I tested that both "Liberation"and "Noto" fonts work fine in LibreOffice in Linux (not Wine) but none works in Wine. I think that Wine does not *provide* details - such as glyphs - to applications from the font file, if the utf8-encoding for a character is more than 2 bytes long. Tested with Wine 1.8 and 2.3 on various OpenSuSEs. No diference. Attaching screenshot from Notepad++ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- You're probably just missing fonts, and replacement settings. Try 'winetricks cjkfonts' to see if it fixes Chinese one. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #2 from Peter Laursen <peter_laursen(a)webyog.com> --- Nope - this "quick ande easy answer" does not catch the point. And in my original post I also explained why. The script displays correctly in Windows and Linux (natively). 1- and 2-byte utf8-characters also do in Wine - but 3 byte utf8-characters don't WITH SAME FONTS USED ("Courier New", "Liberation"and "Noto") -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #3 from Peter Laursen <peter_laursen(a)webyog.com> --- @Nikolay .. you can try yourself simply paste this insert into `unitest`(`id`,`english`,`native`) values (4,'mandarin','官話'); insert into `unitest`(`id`,`english`,`native`) values (5,'thai','ไทย'); insert into `unitest`(`id`,`english`,`native`) values (6,'hindi','हिन्दी'); insert into `unitest`(`id`,`english`,`native`) values (7,'arabic','العربية'); .. into any Windows text editor running in Wine. Compare with same program(s) running in Windows and similar native Linux programs (Gedit, Kedit, Leafpad, whatever) in Linux. This is a bug in Wine IMO - ie. there must be an assumption in code that characters are not more than 2 bytes long. Such assumption is also true for "Windows Unicode" (ie. UTF16 with Little Endian byte-order), but false for UTF8 (and Windows handles UTF8 very well for more than 10 years so Wine also should). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- (In reply to Peter Laursen from comment #3)
@Nikolay .. you can try yourself simply paste this
insert into `unitest`(`id`,`english`,`native`) values (4,'mandarin','官話'); insert into `unitest`(`id`,`english`,`native`) values (5,'thai','ไทย'); insert into `unitest`(`id`,`english`,`native`) values (6,'hindi','हिन्दी'); insert into `unitest`(`id`,`english`,`native`) values (7,'arabic','العربية');
.. into any Windows text editor running in Wine. Compare with same program(s) running in Windows and similar native Linux programs (Gedit, Kedit, Leafpad, whatever) in Linux.
I did just that, and if I select a Chinese font I see the Chinese characters. Like Nikolay said, it's a font replacement issue, not a utf-8 issue.(In reply to Peter Laursen from comment #3)
@Nikolay .. you can try yourself simply paste this
insert into `unitest`(`id`,`english`,`native`) values (4,'mandarin','官話'); insert into `unitest`(`id`,`english`,`native`) values (5,'thai','ไทย'); insert into `unitest`(`id`,`english`,`native`) values (6,'hindi','हिन्दी'); insert into `unitest`(`id`,`english`,`native`) values (7,'arabic','العربية');
.. into any Windows text editor running in Wine. Compare with same program(s) running in Windows and similar native Linux programs (Gedit, Kedit, Leafpad, whatever) in Linux.
This is a bug in Wine IMO - ie. there must be an assumption in code that characters are not more than 2 bytes long. Such assumption is also true for "Windows Unicode" (ie. UTF16 with Little Endian byte-order), but false for UTF8 (and Windows handles UTF8 very well for more than 10 years so Wine also should).
Wine handles UTF8 just fine. Like Nikolay said, this is a font replacement issue. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #5 from Peter Laursen <peter_laursen(a)webyog.com> --- I want to display multiple languages at the same time, so why can't I use an *international* unicode font like I can on both Windows and Linux? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #6 from Peter Laursen <peter_laursen(a)webyog.com> --- Even the browser where you are reading this, can display Mandarin, Thai, Hindi and Arabic scripts in the same page with an international unicode font ... Anyway, if someone can help with a workaround that works for English+Hindi simultaneously that may satisfy my immediate needs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42654 --- Comment #7 from Peter Laursen <peter_laursen(a)webyog.com> --- BTW: "cmd.exe" on Windows has a similar limitation as this blog (written by me) shows: https://blog.webyog.com/a-look-at-unicode-with-bash-on-windows/ But unicode GUI programs don't. So I wonder if Wine uses/invokes code from cmd.exe even with GUI programs? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org