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