[Catalyst] UTF-8 Conversion on the fly
Jonathan Rockway
jon at jrock.us
Fri May 23 18:23:54 BST 2008
* On Fri, May 23 2008, Mesdaq, Ali wrote:
> Hello Everyone,
>
> Got a question about utf8 conversions on the fly. I was wondering if
> anyone had experience and some pointers of good practices for taking a
> webpage thats stored as a blob in mysql then serving that page after its
> been converted to utf8. Right now the way this is implemented is
> conversion before storage but I never liked that idea. The engineer who
> did it thought utf8 conversion is always going to be a smooth thing. I
> also don't like the fact we don't store the orginal copy of the page in
> the db its the converted copy. So I wanted to see if anyone here had
> good suggestions on how the original can be stored and just converted on
> the fly.
I'm not sure what this has to do with Catalyst, but just store the
original data and the encoding in the database, then
my $octets =
Encode::encode('utf-8', Encode::decode($stored_encoding, $stored_webpage));
Regards,
Jonathan Rockway
--
print just => another => perl => hacker => if $,=$"
More information about the Catalyst
mailing list