FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unicode

 
Post new topic   Reply to topic     Forum Index -> MinWin
View previous topic :: View next topic  
Author Message
lindquist



Joined: 14 Sep 2006
Posts: 55
Location: Copenhagen, Denmark

PostPosted: Sat Dec 02, 2006 3:26 am    Post subject: unicode Reply with quote

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
View user's profile Send private message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Sat Dec 02, 2006 3:54 pm    Post subject: Re: unicode Reply with quote

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
View user's profile Send private message
lindquist



Joined: 14 Sep 2006
Posts: 55
Location: Copenhagen, Denmark

PostPosted: Sat Dec 02, 2006 11:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MinWin All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group