Summary | GetGroupName() when dn contains french accents |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | patrick.abiven (at) apitech (dot) fr |
Created | 11/23/2006 (6862 days ago) |
Due | |
Updated | 11/24/2007 (6496 days ago) |
Assigned | 11/01/2007 (6519 days ago) |
Resolved | 11/24/2007 (6496 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
State ⇒ Feedback
Taken from ben
Taken from Ben Klang
consistency in error checking. Please take a look at this diff:
http://cvs.horde.org/diff.php?r1=1.35&r2=1.36&f=framework%2FGroup%2FGroup%2Fldap.php
and test if possible. Apologies for the delay in getting to this. Thanks!
Assigned to Ben Klang
When dn contains french accent, the $result[0] is not set and we get
an invalid index exception.
In getGroupName(), I use the following workaround:
- $result = ldap_explode_dn($dn, 1);
+ $result = ldap_explode_dn(String::convertCharset($dn,
NLS::getCharset(), 'UTF-8'), 1);
Regards
Patrick
http://us3.php.net/ldap-explode-dn
Patrick, can you be more specific than "incorrect"? Are the hex codes
described in those manual notes the problem?
Assigned to ben
State ⇒ Assigned
http://us3.php.net/ldap-explode-dn
Patrick, can you be more specific than "incorrect"? Are the hex codes
described in those manual notes the problem?
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ Horde Framework Packages
Summary ⇒ GetGroupName() when dn contains french accents
Type ⇒ Bug
We are working in ISO-8859-1 charset.
lib/Group/ldap.php getGroupName function uses ldap_explode_dn. But
when the $dn contains french accents, the return is incorrect.
As a workaround, we use:
$result = split ("[=,]", utf8_encode ($dn));
return utf8_decode($result[1]);
But there is maybe a better way to do that. Thanks for your advises.
Regards
Patrick