[Product-Developers] Should setText(), title and description be utf-8 or unicode?

Martijn Pieters mj at zopatista.com
Tue Aug 11 08:43:04 UTC 2009


2009/8/10 Andreas Jung <lists at zopyx.com>:
> I have *never* seen different behaviour. Internal storage format
> is unicode. Data accessed or modified through the accessor/mutator
> methods has to be encoded using the configured site-encoding.
> If you access field directly -> your code is broken (except when
> you are using FieldPropertys).

Archetypes is very much wrong doing this; encoding and decoding should
happen at the I/O boundaries. The number of times I have to
special-case Archetypes because it returns UTF-8 is ridiculous. The
reason Archetypes does this is purely historical, technically there is
no reason anymore (other than backwards compatibility) to not return
unicode.

-- 
Martijn Pieters




More information about the Product-Developers mailing list