View previous topic :: View next topic |
Author |
Message |
lindquist
Joined: 14 Sep 2006 Posts: 55 Location: Copenhagen, Denmark
|
Posted: Sat Dec 02, 2006 3:26 am Post subject: unicode |
|
|
Hi folks.
I'm playing around with MinWin and it seems unicode only works in GTK.
Motif is non unicode all around, and Win32 requires some heavy patching.
My issue:
Is std.utf.toUTF16z a decent approach to adding unicode support for Windows? It seems it will create a lot of temporaries for the GC...
http://famolsen.dk/d/minwin/minwin_unicode.patch
I'd very much like some feedback as I dont just want to commit this if user don't agree it's the right approach. So please let me know how this issue should be adressed! |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Dec 02, 2006 3:54 pm Post subject: Re: unicode |
|
|
lindquist wrote: | Hi folks.
I'm playing around with MinWin and it seems unicode only works in GTK.
Motif is non unicode all around, and Win32 requires some heavy patching.
My issue:
Is std.utf.toUTF16z a decent approach to adding unicode support for Windows? It seems it will create a lot of temporaries for the GC...
http://famolsen.dk/d/minwin/minwin_unicode.patch
I'd very much like some feedback as I dont just want to commit this if user don't agree it's the right approach. So please let me know how this issue should be adressed! |
One of the first things I tried with MinWin was to type a Japanese string. And it didn't work, of course.
I know little about this, but apparently there is a UTF8 code page you can set. This link shows some code that sets it for the console:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=133659&SiteID=1
If there's an equivalent for GUI, then it would be even easier than going the W funcs route.
--bb |
|
Back to top |
|
|
lindquist
Joined: 14 Sep 2006 Posts: 55 Location: Copenhagen, Denmark
|
Posted: Sat Dec 02, 2006 11:13 pm Post subject: |
|
|
After a some advice from the newsgroup I have decided to take the same approach as std.file, which is basically to check the Windows version and use W functions if support or A functions along with UTF8->ANSI translation.
It's in SVN, so testing would be much appreciated. I'm working on a small Unicode sample but it needs a bit more work before I'm committing. |
|
Back to top |
|
|
|