On Tue, 5 Sep 2000, Paul Lindner wrote:
> On Tue, Sep 05, 2000 at 10:23:45AM +0100, Matt Sergeant wrote:
> > On Tue, 5 Sep 2000, Paul Lindner wrote:
> >
> > > Anyway, here's what's in my global.asa to take care of this character
> > > set conversion mess.. Full details available to those that are
> > > interested..
> >
> > [snip]
> >
> > Yikes, you redhat guys really need to look at AxKit:
>
> We have.
>
> > # in .htaccess
> > AxOutputCharset ISO-8859-1
> >
> > And thats it. :-)
> >
>
> But that doesn't provide me dynamic switching between character sets
> based on user preferences. Based on HTTP_ACCEPT_CHARSET we can choose
> to use iso-8859-1 or utf8, plus we need to force Japanese to use
> x-euc-jp on certain platforms, sjis on others.
Thats why everything is a plugin in AxKit. You're free to do that. However
you've reminded me that I do need to implement ACCEPT_CHARSET directly.
> Tell us, how do you do the character set conversion behind the scenes
> for various data sources?
Well all data sources are XML at some point, so XML::Parser converts to
UTF8 for us. Then outgoing charset is converted to via Unicode::String and
Map8. This surely ignores DB's and random files that we don't know the
format of - but how could we expect to cope with that? I'll consider
adding an incoming-charset attribute to the SQL taglib though - that
sounds like a good idea. And maybe some day perl will get input filters or
something to control that for ordinary files...
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org