coming from Archetypes contents, the generated field getters used to return strings, so that e.g. the value u'Ramón' will be returned as 'Ram\xc3\x83\xc2\xb3n', which is an UTF-8 encoded unicode string.
in Dexterity, the value would be returned like this u'Ram\xc3\xb3n', which is just the unicode string.
What is the correct (or better) way to do in Plone?
We are still at Python 2.7 and unicode encode/decode errors are haunting me already since a long time and my brain will probably never fully understand it.
But when it comes to Python 3.x, is there something to take special note regarding this topic?
Rule of thumb (for all Python based versions): use "str" (3.x) or "unicode" (2.x) on the storage level, use str + unicode for processing, convert from/to utf8 for data coming or going to the presentation layer - if needed. Never ever do any internal string processing based on utf8 encoded strings.