On Thu, 20 Dec 2007, Frank Pikelner wrote:
> Hello,
>
> I wanted to ask the list whether anyone has any suggestions or sample
> code for dealing with collecting information such as accounts and
> groups from WMI with localized versions of Windows.
>
> I already have code to query and collect account/group information
> from WMI. The question is on how to correctly collect account/group
> information and present (in an Internet browser) localized Windows OS
> versions where account/group names are created with localized
> alphabets (say Cyrillic).
>
> The standard WMI query to collect Windows local account/group
> information provides correct results. When the same query is used on a
> localized Windows version with Cyrillic characters the result is
> garbage characters.

Assuming you are using Win32::OLE to do your WMI queries, I suspect that
you didn't switch Win32::OLE to Unicode mode.  For backwards compatibility
reasons it is using the ANSI codepage by default and will use replacement
characters for all characters not found in the ANSI codepage.

This is the call to turn on Unicode support in Win32::OLE:

    Win32::OLE->Option(CP => Win32::OLE::CP_UTF8);

Cheers,
-Jan

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to