Re: creole suggested changes to handle encodings

Hans Lellelid <hans-f/[email protected]> Tue, 19 Apr 2005 13:21:14 -0400
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
Hi JCM,

Jean-Christophe Michel wrote:
> Hi,
> 
> Hans, I hope you're still reading.

I read every now & then (using gmane).

> I'm setting up a config to use unicode (utf-8) as internal encoding with
> php, and therefore I had to change a little some Creole classes to
> handle encoding.
> The main idea is to have one more optional param to define the db
> internal encoding. Iconv is then used to automatically convert from db
> encoding to php's encoding, and back when data is passed to creole.
> 
> Works here with mysql (iso-8859-1) / php + iconv (utf-8).
> 
> Is there encoding handling in creole for php5 ?

Not yet, no.

> If not, why ?

Because no one has needed/asked for it yet. :)  We do have encoding
transformations in Propel (using iconv).  I definitely wouldn't want to
make iconv a requirement for Creole, but in your diffs it did look like
it would only be used if the 'encoding' param were set in the DSN.  I
don't know about setting the output_encoding in non-BC Creole, however.
  It seems messy for Creole to be discovering page encodings, so perhaps
it would have to be part of the DSN (...which also seems wrong).  I'll
discuss w/ Creole developers to think about how to implement this in our
version.

Thanks,
Hans

_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev