Unicode Support

Since the 0.9.8 release of Colubrid, you can define the application charset to automatically convert unicode to string objects and vice versa.

By defining the charset variable of your application you can enable this behavior:

class MyApplication(BaseApplication):
    charset = 'utf-8'

    def process_request(self):
        return HttpResponse(u'Hällo Wörld')

When passing unicode strings to request.write colubrid automatically converts them to strings object by encoding them with the charset defined in the application.

form and args parameters are converted to unicode too, but this doesn't apply to the files and cookies variables of the request object.

Last Change: 10 Sep 2006 17:12:27 | show source