| Summary: | MessageBox title does not support UTF-8 on X11 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Jason Wyatt <jwyatt> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | admin, icculus |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
Patch to fix corrupt UTF-8 messagebox titles.
Screenshot of reproduced bug at revision a15188ff9537, Linux Mint 18.1 A demo which reproduces this bug |
||
|
Description
Jason Wyatt
2015-05-01 11:16:48 UTC
Can you provide a tested patch? Thanks! Created attachment 2149 [details]
Patch to fix corrupt UTF-8 messagebox titles.
Tested on KDE. I haven't had a chance to test this elsewhere (hopefully using both methods should give a wider coverage though).
This patch looks reasonable, tagging this with target-2.0.4 so I remember to try it on a Linux machine soon. --ryan. Your patch is now https://hg.libsdl.org/SDL/rev/bf0257e323d2, thanks! --ryan. I having latest revision a15188ff9537 and still has issue (seems text are like ANSI). All my source codes are in UTF8 format and titles / contents are have been passed through translator which returns UTF8 strings. Screenshot will be added. Created attachment 2693 [details]
Screenshot of reproduced bug at revision a15188ff9537, Linux Mint 18.1
Created attachment 2694 [details]
A demo which reproduces this bug
Downloading a copy of Linux Mint. --ryan. (In reply to Ryan C. Gordon from comment #8) > Downloading a copy of Linux Mint. (To be clear: I tried this on a default install of Ubuntu 17.04 and it works correctly, but that doesn't mean much.) --ryan.
> (To be clear: I tried this on a default install of Ubuntu 17.04 and it works
> correctly, but that doesn't mean much.)
Definitely broken on Mint 18.2 (Cinnamon)...it's worth noting that SDL_CreateWindow() works with a Unicode titlebar here, so this is probably easy to fix by comparing these two codepaths.
--ryan.
> Definitely broken on Mint 18.2 (Cinnamon)...it's worth noting that > SDL_CreateWindow() works with a Unicode titlebar here, so this is probably > easy to fix by comparing these two codepaths. Fixed in https://hg.libsdl.org/SDL/rev/931e9d3a452e, and patched to compile in https://hg.libsdl.org/SDL/rev/f7abcb63e51e --ryan. Thanks for the fix, now everything works fine! :D The one question is left that non-ASCII letters are looking too big... But good that there are shown readable rather junk characters.
> The one question is left that non-ASCII letters are looking too big
I think you'd have to take that up with the window manager's code: it decides what font it wants to use here, not us.
--ryan.
|