i18n and unicode

Ian Bicking <[email protected]>
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
Andrea Arcangeli brought up a problem in private email about the recent 
i18n code.  Specifically, it causes previously-str error messages to be 
returned as unicode.  Since these are error messages (i.e., text) I 
think it's clearly right that they are unicode.  OTOH, this is very 
likely to cause regressions in people's code if they aren't ready to 
accept unicode.  htmlfill, for instance, will probably give errors if 
you give it a str template which is not ASCII (e.g., a UTF8-encoded 
template), where previously this would have worked.

I'm not sure how to resolve this.  For htmlfill there is already code to 
give slightly better error messages in this case, so at least the 
problem will be clearer.  For other techniques to fill in errors it 
might not be so easy.  For people using unicode-aware tools (e.g., 
unicode aware templating languages) there will probably be less problems 
than before.

I don't have any good ideas on resolutions here, except perhaps to just 
put in a big warning.

-- 
Ian Bicking | [email protected] | http://blog.ianbicking.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
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.