<div dir="ltr"><div><div><div><div>Hey Gunnar,<br><br></div>this is it. I don't remember what did I do yesterday night and why it was not working, but now I tested it and it is perfect!<br></div><div>The solution was what you wrote: just omit setting the <i>binmode STDOUT, 'utf8';</i> and use the rest. And that is it.<br>
</div><div><br></div>I would like to thank all of you for your help!<br><br></div>Best regards,<br></div>Attila<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 19, 2013 at 9:08 AM, WK <span dir="ltr"><<a href="mailto:wanradt@gmail.com" target="_blank">wanradt@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">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><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 class="im"><div><br></div><div>my $somebody = LdapPerson->new();</div><div>$somebody = LdapPerson->search('<a href="mailto:attila.bardi@example.com" target="_blank">attila.bardi@example.com</a>');</div>
</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>
<span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>Wbr,</font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">Kõike hääd,<br><br>Gunnar</div></font></span></div>
<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br></div>