larskanis/fxruby

Encoding of FXDialogBox::title is not utf8

Closed this issue · 4 comments

Hi All,
On Windows Ruby 2.2.5 systems, when I set the FXDialogBox::title in some languages ​​(such as Chinese and Russian), the title is unreadable.
Perhaps UNICODE is not defined.

Hi All,
According to https://github.com/lylejohnson/fxruby/wiki/Setting-Up-a-Windows-Build-Environment,
I tried to compile the fxruby library, but did not succeed! Is there anyone who can share the experience of compiling fxruby library.
Thank you very much!

The fxruby binary gem is built per rake gem:windows on a Linux box. That should work out of the box. I never tried to compile it native on Windows, so you're best to do it equally.

I noticed the wrong window title encoding some time ago, but didn't investigate it further. It's only on Windows and only in the window title.

Hello everyone. I had the same problem some time ago, I workarounded that by casting:

"title".encode(Encoding::WINDOWS_1252)

This worked for spanish characters. Didn't test it for chinese, maybe it helps by now.

@larskanis @IgorJorobus

Thank you very much!

I have used the "rake gem: windows" command to compile the library successfully.
And we can fix the encoding error by adding "-DUNICODE = 1" to the CXXFLAGS variable in the fox library