Monday, March 12, 2012

I'm losing my tildes over here!

Hi all,
Looks like I inherited a little collation problem, and it's causing me
headaches. This is a little involved, so please bear with me:
Most of the CHAR and VARCHAR columns in the tables of this database are set
to SQL_Latin1_General_CP1_CI_AS collation. A few are set to
SQL_Latin1_General_CP437_CI_AI. Basically this can't be changed. Now when
I bulk import I'm getting strange results. A regular INSERT with some
accented, etc., Latin characters is working fine. An INSERT of 'Mirk' in
the CP437 columns (the A has a tilde over it -- in case it doesn't show up
correctly in people's newsreaders) works as expected.
When I try to bulk import with the ODBC Bulk Operations API the A loses the
tilde. I've tried the Windows MultiByteToWideChar function with several
different Windows code pages with some success (I no longer lose the
accented [e acute] or the French [c with the cedilla] characters
.)
Does anyone have any ideas I can try to keep from losing the tilde over the
A and any other diacritic marks in my Latin characters?
BTW, I can't change the column collations or change them to NVARCHAR.
ThanksHmmm... After more testing, it looks like the Code Page 437 *is* the
problem. It strips out a lot of accent marks. Looks like they'll have to
take it without accent marks or change the code page. Thanks.
"Mike C#" <xyz@.xyz.com> wrote in message
news:uEQe2eryGHA.4452@.TK2MSFTNGP05.phx.gbl...
> Hi all,
> Looks like I inherited a little collation problem, and it's causing me
> headaches. This is a little involved, so please bear with me:
> Most of the CHAR and VARCHAR columns in the tables of this database are
> set to SQL_Latin1_General_CP1_CI_AS collation. A few are set to
> SQL_Latin1_General_CP437_CI_AI. Basically this can't be changed. Now
> when I bulk import I'm getting strange results. A regular INSERT with
> some accented, etc., Latin characters is working fine. An INSERT of
> 'Mirk' in the CP437 columns (the A has a tilde over it -- in case it
> doesn't show up correctly in people's newsreaders) works as expected.
> When I try to bulk import with the ODBC Bulk Operations API the A loses
> the tilde. I've tried the Windows MultiByteToWideChar function with
> several different Windows code pages with some success (I no longer lose
> the accented [e acute] or the French [c with the cedilla] char
acters.)
> Does anyone have any ideas I can try to keep from losing the tilde over
> the A and any other diacritic marks in my Latin characters?
> BTW, I can't change the column collations or change them to NVARCHAR.
> Thanks
>

No comments:

Post a Comment