Subject | fdb - accented characters |
---|---|
Author | Werner |
Post date | 2014-07-09T14:23:02Z |
Hi,
Me again, running into problems if my data contains accented characters, e.g. 'é'.
This is still with Py3.4 and SQLAlchemy 0.9.6.
sqlalchemy.exc.DatabaseError: (DatabaseError) ('Error while executing SQL statement:\n- SQLCODE: -303\n- Dynamic SQL Error\n- SQL error code = -303\n- Malformed string', -303, 335544569) 'INSERT INTO language (id, name, code2, code5, created_at, updated_at, created_by, updated_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' ((1, 'English', 'en', 'en_EN', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (2, 'Français', 'fr', 'fr_FR', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (3, 'Deutsch', 'de', 'de_DE', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (4, 'English - user defined', 'en', 'en_EN', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (6, 'Dansk - support only in English', 'da', 'da_DA', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (7, 'Néerlandais - support only in English', 'nl', 'nl_NL', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None))
The problem is the 'ç' in Français and the 'é' in Néerlandais.
This worked for me in Py2.7 using kinterbasdb, so I wonder where I need to search, is it an fbd issue or SA or my source file encoding?
The source file encoding is "# -*- coding: utf-8 -*-" and the SA engine is setup "engine2 = db2.sa.create_engine(dburl, encoding='utf8', echo=False)".
Werner
Me again, running into problems if my data contains accented characters, e.g. 'é'.
This is still with Py3.4 and SQLAlchemy 0.9.6.
sqlalchemy.exc.DatabaseError: (DatabaseError) ('Error while executing SQL statement:\n- SQLCODE: -303\n- Dynamic SQL Error\n- SQL error code = -303\n- Malformed string', -303, 335544569) 'INSERT INTO language (id, name, code2, code5, created_at, updated_at, created_by, updated_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' ((1, 'English', 'en', 'en_EN', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (2, 'Français', 'fr', 'fr_FR', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (3, 'Deutsch', 'de', 'de_DE', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (4, 'English - user defined', 'en', 'en_EN', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (6, 'Dansk - support only in English', 'da', 'da_DA', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None), (7, 'Néerlandais - support only in English', 'nl', 'nl_NL', datetime.datetime(2014, 7, 9, 16, 4, 9, 2963), None, None, None))
The problem is the 'ç' in Français and the 'é' in Néerlandais.
This worked for me in Py2.7 using kinterbasdb, so I wonder where I need to search, is it an fbd issue or SA or my source file encoding?
The source file encoding is "# -*- coding: utf-8 -*-" and the SA engine is setup "engine2 = db2.sa.create_engine(dburl, encoding='utf8', echo=False)".
Werner