develooper Front page | perl.ldap | Postings from April 2008

Unicode password settings for Active Directory

Thread Next
From:
Howard Wilkinson
Date:
April 18, 2008 07:53
Subject:
Unicode password settings for Active Directory
I have found a previous thread on this list concerning the Active 
Directory change password facility. This describes using the following 
fragment of code to build the Unicode password encoding to pass through 
to active directory.

my $charmap = Unicode::Map8->new('latin1');
my $unicodePwd = $charmap->tou('"'.$password.'"')->byteswap()->utf16();

This works for me so long as  $password contains ASCII characters. 
However if this is a string including for example '£' (english pound 
sign) characters then  the string encoding sent through to AD contains 
something not quite right.

I suspect I need a different charmap but what would be suitable? Am I 
right that this is what is wrong?

Howard.



Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About