Ok, thanks for confirming what I thought.
Too bad that I will need to start using other libraries which are less
accessible.

Octavian

----- Original Message ----- 
From: "Glenn Linderman" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Wednesday, November 29, 2006 3:09 AM
Subject: Re: [perl-win32-gui-users] charset


> On approximately 11/28/2006 8:04 PM, came the following characters from
> the keyboard of Octavian Rasnita:
> >> So I modified Dan's code as below, and it almost works...
> >>
> >
> >
> >> I got a blank window, until I initialized the label with a non-empty
> >> string value... probably due to length calculations somewhere.
> >>
> >
> >
> >> Unfortunately, only the first accented character retains it accent...
> >> the other 3 do not.  The other three all seem to be characters used
only
> >> in Romanian (among language character sets I am somewhat familiar
with).
> >>   I wouldn't think that UTF-8 to UTF-16LE translation should affect
> >> that, so it must be something else... Some hex dumps convince me that
> >> the encode is working properly, so that is good.  But the text is still
> >> not properly displayed, even though it is clearly being set by the 'W'
> >> form of the API call.
> >>
> >
> >
> >> So perhaps the code page for the screen overrides the best efforts of
> >> the programmer to display the right stuff?
> >>
> >
> > I have tried yoursample code. The first time it worked fine and all the
> > special chars were displayed correctly.
> > Then I have tried to make some changes in the regional settings to see
if it
> > works with the default settings.
> >
> > So I have changed in the Regional and language options/Advanced tab to
use
> > the English language when a program doesn't use UTF-8 but a single-byte
> > character type.
> > After doing this, only the first special char was displayed correctly,
> > because it can be also found in the ISO-8859-1 charset.
> > The other chars were replaced with non - correct characters.
> >
> > So I think that Win32::GUI somehow translates the UTF-8 string into a
> > single-byte character and if Windows is set to display the non-UTF-8
> > characters using English, it do so.
> >
> > Teddy
> >
> Well, that is what happened to me.  I don't think Win32::GUI is in the
> business of translating character codes... what it doesn't know about
> Unicode would fill the book on Unicode... so it must be Windows
> itself.... and I have a sneaking suspicion that it has something to do
> with code pages.
>
> I suspect that until Win32::GUI gets complete Unicode support, that
> Windows will limit how much Unicode action can take place.  When I read
> some of the documentation for the Unicode support, it sure seemed that
> for most windows and controls, you have to make them using the W APIs to
> make them work with Unicode characters... and then you pretty much have
> to use all W APIs to access them.  MS seems to have limited their
> support for UTF-8, which would have helped immensely by allowing
> programs that are "mostly" byte-size-character handlers, to introduce
> Unicode gradually.
>
> The support for code page 65001, which seems to be the UTF-8 code page,
> is limited to a small subset of the Windows APIs.
>


Reply via email to