Exception caught for: Type: database; The string contains an untranslatable character

I am migrating a large application from cold fusion to Lucee.

I am getting the bellow error while updating a comment in my application.

ERROR - Exception caught for:
Type: database

Message:[Teradata Database] [TeraJDBC 16.20.00.12] [Error 6706] [SQLState HY000] XYZ_UPDATE:The string contains an untranslatable character.

Detail:Parameter types passed (32): CF_SQL_CHAR, CF_SQL_INTEGER, CF_SQL_INTEGER, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_INTEGER, CF_SQL_INTEGER, CF_SQL_CHAR, CF_SQL_INTEGER, CF_SQL_INTEGER, CF_SQL_INTEGER, CF_SQL_VARCHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_VARCHAR, CF_SQL_VARCHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_INTEGER, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_VARCHAR, CF_SQL_CHAR, CF_SQL_VARCHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_CHAR, CF_SQL_VARCHAR, CF_SQL_INTEGER, CF_SQL_VARCHAR

ERROR: UNABLE TO UPDATE COMMENT

After analysis I found that there is some designer apostrophe like - (DR’s) in my comment text. while I replace these designer apostrophe with normal ones like - (DR’s), I am able to update data in database.

In cold fusion these designer apostrophes are automatically converted to normal apostrophe. But in Lucee these are getting passes directly to database.

Please help me with this so every time I don’t have to manually replace them, and pass the data like cold fusion.

this seems to be the problem

did you try passing the content as sqltype=“nvarchar”? (lucee doesn’t need the cf prefixes)

I tried passing the content as sqltype=“nvarchar”, but It created another exception.

Then I read the article that you provided link to and replaced my DB connection properties to connect to database in ASCII mode instead of utf-8 mode, and It resolved the issue. Although it is converting UTF untranslatable characters to ? but exception is not raised, so comment got updated.

Thank you for quick reply and pointing me to solution of the problem

1 Like