Net::LDAP and utf-8 issuesby Skeeve (Vicar)
|on Jul 12, 2013 at 06:49 UTC||Need Help??|
Skeeve has asked for the
wisdom of the Perl Monks concerning the following question:
I wrote a small script based on Net::LDAP and it seemed to work quite good, until I found an entry giving me, upon printing it: "Wide character in print ...".
I checked the entry using Eclipse and LDAP Browser and this entry seems to be messed up as even that couldn't display it properly.
So now I created a new entry containing some german umlauts and some accented characters.
My script printed them perfectly.
Then I added binmode STDOUT, ':utf8'; and now the warning is gone, but my strings are displayed completely wrong.
What's your suggestion for solving this problem?
I think, I need to fix (delete) the defect entry, but then what about my UTF-8 strings? Why are they displayed correctly when I do not use binmode STDOUT, ':utf8'; but get all scrambled up, when I use it?