<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/12/19 Attila Bárdi <span dir="ltr"><<a href="mailto:attila.bardi@gmail.com" target="_blank">attila.bardi@gmail.com</a>></span><br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>But I don't know the solution.</div></div></blockquote><div><br></div><div>You must deal with decoding in your module, but in your script it should work like this:</div><div><br></div><div>#!/usr/bin/perl</div>
<div>use strict;</div><div>use warnings;</div><div>use Encode;</div><div>binmode STDOUT, 'utf8';</div><div><br></div><div>my $somebody = LdapPerson->new();</div><div>$somebody = LdapPerson->search('<a href="mailto:attila.bardi@example.com">attila.bardi@example.com</a>');</div>
<div>print "displayname: " . decode('utf-8', $somebody->get_displayName() ) . "\n"</div><div><br></div><div>In Dancer you must omit setting binmode on STDOUT, because Dancer sets it itself.  Hope it gives  some hints how to deal with such problem.</div>
</div><div><br></div>-- <br>Wbr,</div><div class="gmail_extra">Kõike hääd,<br><br>Gunnar</div></div>