[dancer-users] character encoding
Attila Bárdi
attila.bardi at gmail.com
Wed Dec 18 14:03:41 GMT 2013
Dear dancers,
I have an openldap server and I do some search in there.
I wrote a perl module to handle the basic operations in the ldap.
So when I search for for example to my displayName, the ldap modul found
the following:
battila at igornb:~$ ./test_ldap.pl
LdapPerson module is successfully loaded!
displayname: Bárdi Attila
battila at igornb:~$
test.pl:
*#!/usr/bin/perl -wuse strict;use warnings;use LdapPerson;my $somebody =
LdapPerson->new();$somebody = LdapPerson->search('attila.bardi at example.com
<attila.bardi at example.com>');print "displayname: " .
$somebody->get_displayName() . "\n"*
But with: *use Dancer ':syntax';*
the "*Bárdi Attila*" become "*Bárdi Attila*"
package MyWeb::App;
use Dancer ':syntax';
use LdapPerson;
our $VERSION = '0.1';
get '/' => sub {
my $somebody = LdapPerson->new();
$somebody = LdapPerson->search('attila.bardi at example.com');
return $somebody->get_displayName();
};
true;
from config.yml:
*# when the charset is set to UTF-8 Dancer will handle for you# all the
magic of encoding and decoding. You should not care# about unicode within
your app when this setting is set (recommended).charset: "UTF-8"*
Can anyone help me what is the problem and how can I solve it?
Best regrds,
Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20131218/0530a73b/attachment.html>
More information about the dancer-users
mailing list