otrs-1.2.2 Customer ldap backend: missing utf8 support

hi! i'm on validating otrs-1.2.2 as support ticket system for our small university. we've stored our "customers" in openldap. there we need to use utf8 for cn, sn and givenname. otrs-1.2.2 seems not to convert utf8 into latin1 (or whatever). q1 is: is there a peace of code (from cvs/ devel) which supports the utf8/latin1 transformation or should i go on and write my own "hack"? q2: why is there a System/CustomerUser/LDAP.pm and a System/CustomerUser/LDAPNew.pm (btw... why is $Self->{UserSearchListLimit} not in Config.pm? System/CustomerUser/LDAP.pm, System/CustomerUser/LDAPNew.pm and System/CustomerUser/DB.pm has "hardcoded" values) ps: thx for otrs! hot stuff! -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]

On Monday, March 15, 2004 3:47 PM
Stephan Lauffer
we've stored our "customers" in openldap. there we need to use utf8 for cn, sn and givenname. otrs-1.2.2 seems not to convert utf8 into latin1 (or whatever).
If you tell it to, it will:
q1 is: is there a peace of code (from cvs/ devel) which supports the utf8/latin1 transformation or should i go on and write my own "hack"?
utf-8 support is possible in two ways: Set these in Config.pm: # $Self->{DefaultCharset} = 'iso-8859-15'; # iso-8859-15 is default $Self->{CustomerUser} = { # [...] # SourceCharset => 'utf-8', DestCharset => 'iso-8859-15', # [...] # }, Or set these: $Self->{DefaultCharset} = 'utf-8'; $Self->{CustomerUser} = { # [...] # # SourceCharset => 'utf-8', # DestCharset => 'utf-8', # [...] # }, If everything fails, uncomment the last two mappings, at least try it. This should work for iso-8859-1: $Self->{DefaultCharset} = 'iso-8859-1'; $Self->{CustomerUser} = { # [...] # SourceCharset => 'utf-8', DestCharset => 'iso-8859-1', # [...] # }, I know no answers to the other questions right now, sorry. Regards, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

Hi! On Mon, Mar 15, 2004 at 05:50:44PM +0100, Robert Kehl wrote:
From: "Robert Kehl"
To: "Development community of OTRS" Date: Mon, 15 Mar 2004 17:50:44 +0100 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Subject: Re: [dev] otrs-1.2.2 Customer ldap backend: missing utf8 support On Monday, March 15, 2004 3:47 PM Stephan Lauffer
wrote: we've stored our "customers" in openldap. there we need to use utf8 for cn, sn and givenname. otrs-1.2.2 seems not to convert utf8 into latin1 (or whatever).
If you tell it to, it will:
q1 is: is there a peace of code (from cvs/ devel) which supports the utf8/latin1 transformation or should i go on and write my own "hack"?
utf-8 support is possible in two ways:
Set these in Config.pm: # $Self->{DefaultCharset} = 'iso-8859-15'; # iso-8859-15 is default $Self->{CustomerUser} = { # [...] # SourceCharset => 'utf-8', DestCharset => 'iso-8859-15',
oh! a source<->dest. mapping. fine! but i didn't found it before. (: so my hack right now is: --- otrs/Kernel/System/CustomerUser/LDAP.pm 2004-02-09 02:41:28.000000000 +0100 +++ /opt/otrs/Kernel/System/CustomerUser/LDAP.pm 2004-03-15 17:54:43.000000000 +0100 @@ -17,2 +17,4 @@ +use Unicode::String qw(utf8 latin1); + use vars qw(@ISA $VERSION); @@ -90,2 +92,4 @@ } + $Name = utf8("$Name"); + $Name = $Name->latin1; return $Name; @@ -150,2 +154,4 @@ } + $CustomerString = utf8("$CustomerString"); + $CustomerString = $CustomerString->latin1; $CustomerString =~ s/^(.*\s)(.+?\@.+?\..+?)(\s|)$/"$1" <$2>/; @@ -176,2 +182,4 @@ $CustomerString .= $entry->get_value($Self->{CustomerUserMap}->{$_}).' '; + $CustomerString = utf8("$CustomerString"); + $CustomerString->latin1; } @@ -226,2 +234,4 @@ } + $Value = utf8("$Value"); + $Value = $Value->latin1; $Data{$Entry->[0]} = $Value; well, I'll try out your mappings. thanks! btw: i removed LDAPNew.pl and otrs is still working. so it might not to be used in 1.2.2. -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]

hi! sorry for the late feedback to the charset mappings. i've tried out: 1. $Self->{DefaultCharset} = 'utf-8'; 2. $Self->{CustomerUser2} = { Name => 'LDAP Backend', SourceCharset => 'utf-8', DestCharset => 'iso-8859-1', ... } $Self->{DefaultCharset} = 'utf-8'; 3. dito with $Self->{DefaultCharset} = 'latin1'; in 1. you can search for user 'müller' but the search list contains utf8 chars. in 2. and 3. searching for 'müller' gives me no result. my fault? (tested with 1.2.2. and latest cvs) On Mon, Mar 15, 2004 at 05:50:44PM +0100, Robert Kehl wrote:
From: "Robert Kehl"
To: "Development community of OTRS" Date: Mon, 15 Mar 2004 17:50:44 +0100 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Subject: Re: [dev] otrs-1.2.2 Customer ldap backend: missing utf8 support On Monday, March 15, 2004 3:47 PM Stephan Lauffer
wrote: we've stored our "customers" in openldap. there we need to use utf8 for cn, sn and givenname. otrs-1.2.2 seems not to convert utf8 into latin1 (or whatever).
If you tell it to, it will:
q1 is: is there a peace of code (from cvs/ devel) which supports the utf8/latin1 transformation or should i go on and write my own "hack"?
utf-8 support is possible in two ways:
Set these in Config.pm: # $Self->{DefaultCharset} = 'iso-8859-15'; # iso-8859-15 is default $Self->{CustomerUser} = { # [...] # SourceCharset => 'utf-8', DestCharset => 'iso-8859-15', # [...] # },
Or set these: $Self->{DefaultCharset} = 'utf-8'; $Self->{CustomerUser} = { # [...] # # SourceCharset => 'utf-8', # DestCharset => 'utf-8', # [...] # },
If everything fails, uncomment the last two mappings, at least try it. This should work for iso-8859-1:
$Self->{DefaultCharset} = 'iso-8859-1'; $Self->{CustomerUser} = { # [...] # SourceCharset => 'utf-8', DestCharset => 'iso-8859-1', # [...] # },
I know no answers to the other questions right now, sorry.
Regards,
Robert Kehl
-- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388 _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
-- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]

On Monday, March 22, 2004 3:39 PM
Stephan Lauffer
i've tried out:
1. $Self->{DefaultCharset} = 'utf-8';
Try setting both Source- and DestCharset to utf-8, then.
2. $Self->{CustomerUser2} = {
beepbeepbeep Typo?
Name => 'LDAP Backend', SourceCharset => 'utf-8', DestCharset => 'iso-8859-1', ... } $Self->{DefaultCharset} = 'utf-8';
3. dito with $Self->{DefaultCharset} = 'latin1';
Which is iso-8859-1, take this. hth, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

Hi Robert! On Wed, Mar 24, 2004 at 12:29:16PM +0100, Robert Kehl wrote:
From: "Robert Kehl"
To: "Development community of OTRS" Date: Wed, 24 Mar 2004 12:29:16 +0100 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Subject: Re: [dev] otrs-1.2.2 Customer ldap backend: missing utf8 support On Monday, March 22, 2004 3:39 PM Stephan Lauffer
wrote: i've tried out:
1. $Self->{DefaultCharset} = 'utf-8';
Try setting both Source- and DestCharset to utf-8, then.
i will do asap (tomorrow or so)
2. $Self->{CustomerUser2} = {
beepbeepbeep Typo? <OTRSfeaturebeep>http://doc.otrs.org/cvs/en/html/customer-user-backend.html>:
"Note: It's also possible to define more the one "CustomerUser" config option. You just need to add a number between 1 and 10. For example "CustomerUser1". Robert, read your docs, otrs has nice features (: ;))) -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]

On Wednesday, March 24, 2004 6:53 PM
Stephan Lauffer
2. $Self->{CustomerUser2} = {
beepbeepbeep Typo?
<OTRSfeaturebeep>http://doc.otrs.org/cvs/en/html/customer-user-backend.h tml>:
"Note: It's also possible to define more the one "CustomerUser" config option. You just need to add a number between 1 and 10. For example "CustomerUser1".
Robert, read your docs, otrs has nice features (:
Point ;-} Nonetheless, you typed "2." - does it correspond with "more than one"? Regards, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

hi! On Thu, Mar 25, 2004 at 12:05:41AM +0100, Robert Kehl wrote:
From: "Robert Kehl"
To: "Development community of OTRS" Date: Thu, 25 Mar 2004 00:05:41 +0100 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Subject: Re: [dev] otrs-1.2.2 Customer ldap backend: missing utf8 support On Wednesday, March 24, 2004 6:53 PM Stephan Lauffer
wrote: 2. ^^ this one, robert?
$Self->{CustomerUser2} = {
beepbeepbeep Typo?
<OTRSfeaturebeep>http://doc.otrs.org/cvs/en/html/customer-user-backend.h tml>:
"Note: It's also possible to define more the one "CustomerUser" config option. You just need to add a number between 1 and 10. For example "CustomerUser1".
Robert, read your docs, otrs has nice features (:
Point ;-} Nonetheless, you typed "2." - does it correspond with "more than one"?
i was trying out three different scenarios. since my ldap backend is in $Self->{CustomerUser2} and your src/dst mapping was relating on the $Self->{CustomerUserXX}, i needed to put it in there. so the "2." was something like s/2\./2nd test/ and has nothing to do with any otrs Config.pm. -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]

Hi Stephan, I'm not sure if the problem still exists. If yes, the chrset convertation e. g. utf8<->iso-8859-1 just works with the current cvs Kernel/System/CustomerUser/LDAP.pm. Not with the Kernel/System/CustomerUser/LDAP.pm vom OTRS 1.2 (see doc.otrs.org). -Martin On Thu, Mar 25, 2004 at 08:54:48AM +0100, Stephan Lauffer wrote:
hi!
On Thu, Mar 25, 2004 at 12:05:41AM +0100, Robert Kehl wrote:
From: "Robert Kehl"
To: "Development community of OTRS" Date: Thu, 25 Mar 2004 00:05:41 +0100 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Subject: Re: [dev] otrs-1.2.2 Customer ldap backend: missing utf8 support On Wednesday, March 24, 2004 6:53 PM Stephan Lauffer
wrote: 2. ^^ this one, robert?
$Self->{CustomerUser2} = {
beepbeepbeep Typo?
<OTRSfeaturebeep>http://doc.otrs.org/cvs/en/html/customer-user-backend.h tml>:
"Note: It's also possible to define more the one "CustomerUser" config option. You just need to add a number between 1 and 10. For example "CustomerUser1".
Robert, read your docs, otrs has nice features (:
Point ;-} Nonetheless, you typed "2." - does it correspond with "more than one"?
i was trying out three different scenarios. since my ldap backend is in $Self->{CustomerUser2} and your src/dst mapping was relating on the $Self->{CustomerUserXX}, i needed to put it in there. so the "2." was something like s/2\./2nd test/ and has nothing to do with any otrs Config.pm.
-- Liebe Gruesse, with best regards Stephan Lauffer
[ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ] _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

hi!
I'm not sure if the problem still exists. depends on... I've sent (on Mon, 15 Mar 2004 18:00:05 +0100) my patch for the LDAP.pm to this list. so i don't have any problems with the utf8 stuff (but the patch is just a stupid hack). ;)
but i'll check the latest LDAP.pm next week and add a notice to bugzilla #369. -- Liebe Gruesse, with best regards Stephan Lauffer [ Pedagogical University Freiburg - Germany ] [ http://www.ph-freiburg.de/zik/ ] [ Fon/ Fax: +49 761 682 -459/ -486 ]
participants (3)
-
Martin Edenhofer
-
Robert Kehl
-
Stephan Lauffer