After some investigation of the method columnsFromSchema it looks like Firebird (FB 2.5 SuperServer actualy) returns the information about the field type in following form:
u'SHORT                                                                                        '
so it is necessary to add
t = t.strip()
in the for loop (tested)

Anyway, I guess it cant hurt anything.

My guess was wrong. It ruined a lot of things in my web app (TurboGears actually). I see on many of my pages something like bellow included Traceback.

According to the Ivan Crstic, the schema for working with international characters = unicode has to be:
  1. Decode early
    (by reading ASCII from the database and decode it using charset value default to the database or to the field)
    >>> def to_unicode_or_bust(
    ...         obj, encoding='utf-8'):
    ...     if isinstance(obj, basestring):
    ...         if not isinstance(obj, unicode):
    ...             obj = unicode(obj, encoding)
    ...     return obj
  2. Unicode everywhere
  3. Encode late
But I am l lost again with all this UnicodeEncodeError troubles.
Any idea how to solve it? What I am doing wrong?
Page handler: <bound method ProdejniMista.stavyZasobniku of <fantomas.controllers.ProdejniMista instance at 0x3404e18>>
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/", line 121, in _run
  File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/", line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in stavyZasobniku
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 360, in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 359, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 373, in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 423, in _execute_func
    return _process_output(output, template, format, content_type, mapping, fragment)
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/", line 88, in _process_output
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/view/", line 159, in render
    return engine.render(**kw)
  File "/usr/lib/python2.5/site-packages/TurboKid-1.0.5-py2.5.egg/turbokid/", line 220, in render
    output=output, format=format)
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 301, in serialize
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 299, in serialize
    return serializer.serialize(self, encoding, fragment, format)
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 107, in serialize
    text = ''.join(self.generate(stream, encoding, fragment, format))
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 629, in generate
    for ev, item in self.apply_filters(stream, format):
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 165, in format_stream
    for ev, item in stream:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 221, in _coalesce
    for ev, item in stream:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 477, in inject_meta_tags
    for ev, item in stream:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 179, in _track
    for p in stream:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 32, in apply_matches
    item = stream.expand()
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 108, in expand
    for ev, item in self._iter:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 179, in _track
    for p in stream:
  File "/usr/lib/python2.5/site-packages/kid-0.9.6-py2.5.egg/kid/", line 221, in _coalesce
    for ev, item in stream:
  File "/TG_web/fantomas/templates/", line 207, in _pull
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/", line 1154, in _SO_foreignKey
    return joinClass.get(id, connection=self._connection)
  File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/", line 882, in get
    val._init(id, connection, selectResults)
  File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/", line 924, in _init
  File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/", line 1130, in _SO_selectInit
    colValue = col.to_python(colValue, self._SO_validatorState)
  File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/", line 513, in to_python
    return value.encode(dbEncoding)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 8: ordinal not in range(128)
Error location in template file '/TG_web/fantomas/templates/zasobniky.kid'
between line 26, column 8 and line 27, column 8:
        <td align="left" py:content="zasobnik.ciselnik.nazev"/>