Petro Verkhogliad wrote:
> Thanks that does help. The only thing that worked is the following:
> unicode(book.author.decode('latin1').encode('utf8'), 'utf-8')
>
> a little hackish.
you're overdoing things. decode returns a Unicode string, which
you're encoding again, and decoding again.
to go from latin-1 to unicode, use
u = book.author.decode('latin1')
or, if you prefer
u = unicode(book.author.decode, 'latin1')
Kid uses the standard Python I18N model (for international text,
use either byte strings with ASCII only, or Unicode strings), and
will take care of the rest on the way out.
</F>