[dev] Multilingualistion
Akira Kurogane
akira@kurogane.net
Wed, 10 Apr 2002 00:34:02 +0900
引用中 Jan Schneider <jan@horde.org>:
> Zitat von Akira Kurogane <akira@kurogane.net>:
> > [in iconv there] is no detection routine. ...
> I don't think we need a charset detection routine. We can (or should at
> least) rely on the charsets that are provided by the message headers and
> the translations.
Well, this sounds like the strict method, which is admirable. I used charset
detection (only in some places. mind) because sometimes there isn't a variable
in direct environment (ie. in the local scope of the relevant functions) of
imp/horde which can be used to identify the charset of the mime <i>part</i>. For
example, the encode() function of MIME "Message" object (lib/MIME/Message.php)
presently derives it's charset from the browser's HTTP_ACCEPT_CHARSET or the
Lang object, not by referencing the relevant mime part.
The second point about not having a charset-detect function is that it prevents
imp from dealing with mail such as the one we received from a <hem@eyou.com>
earlier today. Hem's client didn't provide RFC-??? compliant headers, and hence
we all saw something like "AoO3/4+o" for his header, which was actually 'Liu Zhi
Bin' in the GB2312 Simplified Chinese charset.
But my two cents is: let it go. If a mail is non-RFC-compliant, nobody should be
making any efforts to save it. (apologies to Hem).
So in summary, I support that idea to avoid using charset detection.
> One problem that still isn't solved is the missing support for Japanese
> charsets in htmlspecialchars(). We can't just drop it like you did in your
> patches, for security reasons.
Good point! I meant to make something better eventually, guess I'll have to do
it sooner rather than later. This may require that charset be supplied as an
additional parameter to the function, though.
Akira
-------------------------------------------------
>From Kurogane.net
>From nuno@eth.pt Date: 09 Apr 2002 16:56:24 +0100
Return-Path: <nuno@co.eth.pt>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 22401 invoked from network); 9 Apr 2002 15:56:06 -0000
Received: from hq.eth.pt (root@194.65.84.1)
by clark.horde.org with SMTP; 9 Apr 2002 15:56:06 -0000
Received: from dev.hq.eth.pt (dev.hq.eth.pt [10.1.1.10])
by hq.eth.pt (8.11.6/8.11.6) with ESMTP id g39FuN104768
for <dev@lists.horde.org>; Tue, 9 Apr 2002 16:56:23 +0100
From: Nuno Loureiro <nuno@eth.pt>
To: dev@lists.horde.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailer: Ximian Evolution 1.0.3
Date: 09 Apr 2002 16:56:24 +0100
Message-Id: <1018367784.1114.72.camel@dev.hq.eth.pt>
Mime-Version: 1.0
Subject: IMP using Horde's Auth
Hi!
I need to implement a different auth driver, to use with imp for a
particular use. If I use horde's auth, I need to login twice (1 for
Horde, 1 for IMP). If I use IMP's auth, I do not have an API like
horde's auth, with backend drivers.
So, to implement a new auth mechanism, it would be simpler to just
implement a new driver for horde's auth API. Since I need that auth
mechanism for IMP, and I don't want to login twice, I need to change
horde/imp in a manner that I just need to login once.
Since horde can benefict from this feature, I'd like to try to implement
it in a manner it can be added to the project, so here're my thoughts:
- To let IMP uses Horde's auth, I need to change Horde's login, so it
knows the IMAP/POP server, port, folder, etc...=20
- Horde needs to know that it'll be used for logging in IMP
- IMP needs to know that will use Horde's auth
Since it's IMP that'll use Horde's auth, and not the opposite, I think
the best place to put such information in the config files, is in
imp/config/conf.php. I think that something like $conf['auth']['login']
=3D 'horde' would be fine, no?
General steps:
- Horde's login:
. Check if IMP is installed and if $conf['auth']['driver'] =3D 'horde'
. If so, check $conf['server']['server_list'], etc, and adjust
horde's login so it asks the relevant information for logging in IMP...
- IMP's login:
. Check if $conf['auth'['driver'] =3D 'horde'
. If so, check if the user is logged in horde
. If so, do IMP's auth automatically through redirect.php
Problems/Questions for now:
- Is this the best way to do this, or is it good enought?
- What's the better way to check if IMP is installed?
I'd really apreciate comments/answers on this subject...
Thanks in advance..
Best Regards,
Nuno Loureiro
--=20
Nuno Loureiro <nuno@eth.pt>
Ethernet, Solu=E7=F5es Inform=E1ticas, LDA
http://www.eth.pt