<div dir="ltr"><div><div><div><div><div>Dear dancers,<br><br></div>I have an openldap server and I do some search in there.<br></div>I wrote a perl module to handle the basic operations in the ldap.<br></div>So when I search for for example to my displayName, the ldap modul found the following:<br>
<br>battila@igornb:~$ ./<a href="http://test_ldap.pl" target="_blank">test_ldap.pl</a> <br>LdapPerson module is successfully loaded!<br>displayname: Bárdi Attila<br>battila@igornb:~$ <br><br><br></div><div><a href="http://test.pl">test.pl</a>:<br>
<i>#!/usr/bin/perl -w<br>use strict;<br>use warnings;<br>use LdapPerson;<br><br>my $somebody = LdapPerson->new();<br>$somebody = LdapPerson->search('<a href="mailto:attila.bardi@example.com">attila.bardi@example.com</a>');<br>
print "displayname: " . $somebody->get_displayName() . "\n"<br></i><br><br></div><div></div>But with: <i><b>use Dancer ':syntax';</b></i><br><br></div><div>the "<b>Bárdi Attila</b>" become "<b>Bárdi Attila</b>"<br>
<br>package MyWeb::App;<br>use Dancer ':syntax';<br>use LdapPerson;<br><br>our $VERSION = '0.1';<br><br>get '/' => sub {<br> my $somebody = LdapPerson->new();<br> $somebody = LdapPerson->search('<a href="mailto:attila.bardi@example.com">attila.bardi@example.com</a>');<br>
return $somebody->get_displayName();<br>};<br><br>true;<br><br></div><div>from config.yml:<br><br><i># when the charset is set to UTF-8 Dancer will handle for you<br># all the magic of encoding and decoding. You should not care<br>
# about unicode within your app when this setting is set (recommended).<br>charset: "UTF-8"</i><br><br></div><div><br></div><div>Can anyone help me what is the problem and how can I solve it?<br>
<br></div><div>Best regrds,<br></div><div>Attila<br></div></div>