Hi!
On Mon, Mar 15, 2004 at 05:50:44PM +0100, Robert Kehl wrote:
> From: "Robert Kehl" <[EMAIL PROTECTED]>
> To: "Development community of OTRS" <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]> 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)([EMAIL PROTECTED])(\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 ]
_______________________________________________
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