Re: Character encoding

Raphael Ritz <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Organization Humboldt-University Berlin
Message-ID <[email protected]>
Stefan H. Holek wrote:
> The problem with guessing always is that you might guess wrong,  causing 
> problems that are harder to find by several orders of  magnitude. I'd 
> much rather say: your content must be in the  configured site encoding, 
> otherwise you are dead. Period. At least  that's deterministic. ;-)

While I agree in principle it just doesn't fit real life :-(

And since we do have a function 'guess_encoding' in

     Products.MimetypesRegistry.encoding

which in its current form is far from perfect, why not
improve it?

Note that calling 'guess_encoding' already is only a
fallback for the mimetype tool, so whenever the encoding
is defined properly it shouldn't be called anyway.

Raphael

> 
> Stefan
> 
> 
> On 3. Apr 2006, at 19:13, Geoff Davis wrote:
> 
>> I haven't been following this issue closely, but I have some vague
>> memories that AT has problems getting charset encodings sometimes  (maybe
>> when people submit blocks of text in forms?)
>>
>> Anyway, Mark Pilgrim has ported Mozilla's character encoding  
>> autodetection
>> code to python, and I think it might be very useful in such  situations:
>>
>> http://chardet.feedparser.org/
>>
>> Geoff
> 
> 
> -- 
> Anything that happens, happens.  --Douglas Adams
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live 
> webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.