Merge lp:~sharoonthomas/openobject-server/patchfor_postgressql_environnonutf8 into lp:openobject-server/5.0
Proposed by
Sharoon Thomas http://openlabs.co.in
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Christophe Simonis (OpenERP) | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~sharoonthomas/openobject-server/patchfor_postgressql_environnonutf8 | ||||
Merge into: | lp:openobject-server/5.0 | ||||
Diff against target: |
12 lines (+1/-1) 1 file modified
bin/service/web_services.py (+1/-1) |
||||
To merge this branch: | bzr merge lp:~sharoonthomas/openobject-server/patchfor_postgressql_environnonutf8 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christophe Simonis (OpenERP) | Approve | ||
Christophe CHAUVET (community) | Approve | ||
Review via email: mp+17222@code.launchpad.net |
To post a comment you must log in.
If the postgres cluster is on a different encoding or no environment is www.postgresql. org/docs/ 8.4/static/ multibyte. html)
specified then the database created will be of encoding SQL_ASCII
(Refer:http://
Hence template1 will use the specified encoding which is not UTF8.
Line 80 of webservices.py has a simple create command which will err out
in such a situation.
It has to change from:
cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name)
to
cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\' TEMPLATE template0' % db_name)
if not the error would be:
new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
*** Apologies for the last merge proposal. It had my local settings too.