Roundup Tracker - Issues

Message2067

Author anonymous
Recipients
Date 2005-12-06.10:53:29
Message-id
In-reply-to
Hello,
when you (I - blush) don't have a good encoding in
PostgreSQL's template1 database, the roundup database
gets created with the wrong encoding, and bad problems
might ensue (eg. not being able to use accented
characters). In this case, roundup throws very ugly
unicode decoding errors.

I suggest the following fix:

In roundup/backends/back_postgresql.py, there is:

def db_create(config):
    """Clear all database contents and drop database
itself"""
    command = 'CREATE DATABASE %s'%config.RDBMS_NAME
    logging.getLogger('hyperdb').info(command)
    db_command(config, command)

This should be changed to read

def db_create(config):
    """Clear all database contents and drop database
itself"""
    command = "CREATE DATABASE %s WITH ENCODING =
'UNICODE'"%config.RDBMS_NAME
    logging.getLogger('hyperdb').info(command)
    db_command(config, command)

to enforce UNICODE for the roundup database. This might
break with older PostgreSQL installations (I didn't
check), but should hopefully solve the problem for
anyone using 7.3 and up.
History
Date User Action Args
2009-02-03 14:21:31adminlinkissue1374235 messages
2009-02-03 14:21:31admincreate