commit 27013e87f53cccbfd2e203f065e416437ba08987
Author: Mike Lundy <email address hidden>
Date: Fri Mar 2 00:15:04 2012 +0000
Fail gracefully when the db doesn't speak unicode
When sqlalchemy/mysql doesn't contain the charset=utf8 or use_unicode=1
parameters (and the default mysql connection charset is not utf8),
sqlalchemy will connect to mysql in ascii mode; In ascii mode, it will
attempt to reencode all input data to latin-1 regardless of the
database/table collation setting. This catches that error and turns it
into an invalid parameter.
(The error message associated with this is something like
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2026' in
position 30: ordinal not in range(256))
Reviewed: https:/ /review. openstack. org/4787 github. com/openstack/ nova/commit/ 27013e87f53cccb fd2e203f065e416 437ba08987
Committed: http://
Submitter: Jenkins
Branch: master
commit 27013e87f53cccb fd2e203f065e416 437ba08987
Author: Mike Lundy <email address hidden>
Date: Fri Mar 2 00:15:04 2012 +0000
Fail gracefully when the db doesn't speak unicode
When sqlalchemy/mysql doesn't contain the charset=utf8 or use_unicode=1
parameters (and the default mysql connection charset is not utf8),
sqlalchemy will connect to mysql in ascii mode; In ascii mode, it will
attempt to reencode all input data to latin-1 regardless of the
database/table collation setting. This catches that error and turns it
into an invalid parameter.
(The error message associated with this is something like deError: 'latin-1' codec can't encode character u'\u2026' in
UnicodeEnco
position 30: ordinal not in range(256))
This fixes bug 944034 and is related to bug 898808
Change-Id: I082b7568ef9e9d 2104e13aa58d207 535ef201bd3