|Subject||Re: Special Character Problems (Trademark Symbol)|
--- In firstname.lastname@example.org, "mbellisle_retire" wrote:
> I'm having a problem with getting data out of an IB db using Free
> IBProvider odbc driver.
I can't help you with the odbc driver, but if it works
correctly, everything should fit together after you
solved the underlying character set problem.
> The problem is, some of the IB data contains the trademark symbol
> (), and it's causing an error.
So let's try to debug with the old but trustworthy ISQL console.
Open a console window (you are on a NT+ system?)
Set the console's codepage to 1252 with:
Start ISQL and set the connection char set to CP1252:
SQL> set names WIN1252;
Open your database, select the offending field:
SQL> select FLD from TBL where COND;
Now, I assume ISQL gives:
> Cannot transliterate character between character sets
Select using explicit cast (match your field length)
SQL> select cast (FLD as varchar(200) character set WIN1252);
Does that work and display the TM-Symbol?
O.K. "Dangerous Bend" sign ahead - do you have a backup?
Safe way: add a new column with character set WIN1252
and copy the data to the new column, using the cast
Hack: Change the metadata of the existing column, setting
character set ID to 53
After either of these surgeries, you should now be able
to get the TM-sign in ISQL without cast.
Now your ODBC access should work too, using WIN1252 as
connection character set.