Language problem with Perl
Test.Pl The test script attempts to use both Win32::NetAdmin::LocalGroupAddUsers and Win32::Lanman::NetLocalGroupAddMembers to add members to a specified group. But the name of the group passed to the methods does not appear to be correct when applied to the Hungarian. Please review the script and result. Let me know if this is a Perl problem or not and if anyone knows of a way to correct this behavior. #THIS SCRIPT WORKS CORRECTLY FOR OTHER OS LANGUAGES: # ENGLISH - WORKS (Administrators) # SPANISH - WORKS (Administratadores) # GERMAN - WORKS (Administratoren) # HUNGARIAN - FAILS (Rendszergazdák) WITH 2220 (group name could not be found) Test.Pl Description: Test.Pl ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Language problem with Perl
At 06:21 PM 4/5/2006 -0400, Bullock, Howard A. wrote: #THIS SCRIPT WORKS CORRECTLY FOR OTHER OS LANGUAGES: # ENGLISH - WORKS (Administrators) # SPANISH - WORKS (Administratadores) # GERMAN - WORKS (Administratoren) # HUNGARIAN - FAILS (Rendszergazdák) WITH 2220 (group name could not be found) #ALSO PRINTS CORRECTLY TO THE OUTPUT SCREEN IN KOMODO: Rendszergazdák. # #HOWEVER, IN THE LOG FILE IT COMES OUT AS: Rendszergazdák. I bet this is the problem. The á character seems to be in unicode rather than ascii. U can try directly inputting it with Alt+0225 or doing chr(225) (or whatever it is in Hungarian encoding). -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede malis 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Language problem with Perl
I bet this is the problem. The á character seems to be in unicode rather than ascii. U can try directly inputting it with Alt+0225 or doing chr(225) (or whatever it is in Hungarian encoding). Thanks, I believe you may be correct in that some characters are not being handled properly. But can anyone point me in the direction of generic solution so that this will function regardless of language? The data comes directly from Win32::NetAdmin::GetAliasFromRID() so one would think that there is way to properly pass the this name to another method even if some transformation is necessary. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Language problem with Perl
At 08:59 PM 4/5/2006 -0400, Bullock, Howard A. wrote: Thanks, I believe you may be correct in that some characters are not being handled properly. But can anyone point me in the direction of generic solution so that this will function regardless of language? The data comes directly from Win32::NetAdmin::GetAliasFromRID() so one would think that there is way to properly pass the this name to another method even if some transformation is necessary. Probably one of the Unicode functions can do it. I'm pretty sure there are functions to translate character encodings. And as I recall I ran into the same problem with Lanman, it's not unicode aware at all. U could probably test it by building up the Rendszergazdák string directly with chr()'s so there's no doubt about what's being passed. -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede malis 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs