Opened 7 years ago

Closed 6 years ago

#1416920 closed Bugs (fixed)

LDAP search results encoded as UTF-8

Reported by: nobody Owned by: justinrandell
Priority: 5 Milestone:
Component: Other Version: None
Severity: critical Keywords:
Cc:

Description

Non-ACSII chars to not show up correctly in the LDAP
search results. Our OpenLDAP server seems to send
results encoded as UTF-8. RoundCube just outputs this
into the ISO-8859-1 HTML page, which obviously cannot work.

I´ve been able to solve the problem by replacing this line

$contacts[$n]['name']   =
$result[$n][$server['name_field']][0];

with this

$contacts[$n]['name']   =
utf8_decode($result[$n][$server['name_field']][0]);

I don´t know whether all LDAP servers return search
results as UTF-8, so maybe this should be made
configurable or somehow auto-detected.

Change History (2)

comment:1 Changed 7 years ago by nobody

Logged In: NO 

The problem affects more than just the LDAP results. For
example special characters (those who are represented with
more than one byte in UTF-8) were mangled in the email
messages, too.

The solution ist to configure your webserver to send the as
UTF-8 to the browsers. I do not understand why RoundCube
does not do this with a simple call to the PHP header()
function. We´ve now configured our Apache to send the UTF-8
header:

AddDefaultCharset utf-8

comment:2 Changed 6 years ago by thomasb

  • Resolution changed from None to fixed
  • Severity set to critical
  • Status changed from assigned to closed

Should be fixed with new LDAP integration.

Note: See TracTickets for help on using tickets.