I’m testing wxHaskell on Windows XP using the “Hello World” here: http://www.haskell.org/haskellwiki/WxHaskell/Quick_start
But when it runs on my machine, all the text doesn’t display.
For instance, “Quit” will just display “Q”.
Any Ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to ensure that the wxWidgets used to build wxhaskell has Unicode support enabled. I think you can check by running wx-config –libs –unicode.
What I think is happening is that wxWidgets is expecting simple 8 bit chars but is receiving wide 32 bit ones. The zeroes are interpreted as null characters, ie string terminators. Enabling Unicode support gives you a wxWidgets which accepts wide chars. I’m not entirely sure this version of the story is quite accurate, but I do know that Unicode wxWidgets solves the problem.
On most Linux distributions, I imagine, the wxWidgets package already has Unicode support.
On MacOS X, the bundled wxWidgets does have Unicode support but is unfortunately missing some necessary features related to event handling. The easiest way to get a working wxWidgets is through Homebrew ( brew update; brew install wxmac ).
I have never tried wxhaskell on Windows but others have.