Ian Bicking: the old part of his blog

Re: Do I hate Unicode, or Do I Hate ASCII?

well, i usually code like this:

at least this is what i'm trying ;)

there are generally 2 problems with this approach in python (it's much better in java for example):

  1. probably because of historical reasons (first there were byte-strings?) python kind-of recommends byte-strings...well, not exactly recommends..but..for example if you want to write an unicode string you have to prefix it with [u]. so it's usually extra work to enter unicode strings. in java this issue does not exists, because there the strings are unicode. there are no byte-strings (only byte-arrays)
  2. probably a consequence of #1: many library functions only deal with byte-strings. and what's worse, sometimes (to be sure) they start with somethings like "input = str(input)". and this of course completely fails when the input contains non-ascii... so you have to be careful...
Comment on Do I hate Unicode, or Do I Hate ASCII?
by Gabor Farkas