dbTalk Databases Forums  

SQL 5.5 cp850 convert to SQL 11 utf8 DB

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss SQL 5.5 cp850 convert to SQL 11 utf8 DB in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Hoffmann
 
Posts: n/a

Default SQL 5.5 cp850 convert to SQL 11 utf8 DB - 10-09-2009 , 10:20 AM






We can unload a Database from SQL Anywhere Vers. 5.5 into a
SQL 11 Database with the collation cp850 (charset
Windows-1252) with the unload-utility from Sybase SQL
Anywhere 11. But we don't can convert this SQL Anywhere 11
cp850 database in a SQL Anywhere UTF-8 database.

From Version 9.0 to 11.0 it works.

We have try:

dbunload -c
"uid=dba;pwd=XXX;charset=cp850;dbf=customer.db "
-ac
"uid=dba;pwd=sql;charset=UTF-8;dbf=newsql11.db"
-xx

The dbunload.exe have some problems with special signs
(ä,ö,ü etc.)

Can you help us?

Thank you!

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: SQL 5.5 cp850 convert to SQL 11 utf8 DB - 10-09-2009 , 12:40 PM






This sounds like an old problem that is somewhat
self inflicted; but all too common. The effect is
the bits-in are not the same as their interpretation
or the collation.

It was very common for users of an older
version to say the database is using a cp850
collation (or winlatin1 or something else
entirely) but then stuff local system charset
based characters into the database tables and
assume that it was perfectly normal. Unfortunately
that was often standard practice back then. It
was also all too easy to just do that and not
understand that was actually occurring.

In your case I would assume you actually
have CP1252 characters stored inside the
database (even those the collation was cp850).
That was always possible (and unfortunately
all too common a practice) because:

A - It often just seemed to work.
B - Older applications didn't consider
collations and charset conversions.
and
C - Version 5.x did not do any charset conversions
[though sometimes a MS ODBC code page translator
driver was sometimes chosen in some cases]

You should check the `select cast( column as binary)`
of your values (or look at the data from an unload table)
to see which code page they match;

http://en.wikipedia.org/wiki/Code_page_1252
http://en.wikipedia.org/wiki/Code_page_850

If your ä,ö, and ü characters are E4 and higher then you
have CP1252 chars inside you CP850 database
and should rebuild it as a CP1252 (or at least
winlatin1 if 1252 is not available) with the version
5.5 s\w and then do your upgrades.

[CP850 have those characters in the 0x81 through 0x94 range]

<Thomas Hoffmann> wrote


We can unload a Database from SQL Anywhere Vers. 5.5 into a
SQL 11 Database with the collation cp850 (charset
Windows-1252) with the unload-utility from Sybase SQL
Anywhere 11. But we don't can convert this SQL Anywhere 11
cp850 database in a SQL Anywhere UTF-8 database.

From Version 9.0 to 11.0 it works.

We have try:

dbunload -c
"uid=dba;pwd=XXX;charset=cp850;dbf=customer.db "
-ac
"uid=dba;pwd=sql;charset=UTF-8;dbf=newsql11.db"
-xx

The dbunload.exe have some problems with special signs
(ä,ö,ü etc.)

Can you help us?

Thank you!

Reply With Quote
  #3  
Old   
It's cp850!
 
Posts: n/a

Default Re: SQL 5.5 cp850 convert to SQL 11 utf8 DB - 10-12-2009 , 10:27 AM



We have those characters in the 0x81 through 0x94 rang.
And after the unload to SQL11 utf8, we have the same
characters for the "ä"!(0x84 instead 0xC3A4)

Do we really have to develop a program that converts these
characters in the export DAT file in a correct format?

Quote:
This sounds like an old problem that is somewhat
self inflicted; but all too common. The effect is
the bits-in are not the same as their interpretation
or the collation.

It was very common for users of an older
version to say the database is using a cp850
collation (or winlatin1 or something else
entirely) but then stuff local system charset
based characters into the database tables and
assume that it was perfectly normal. Unfortunately
that was often standard practice back then. It
was also all too easy to just do that and not
understand that was actually occurring.

In your case I would assume you actually
have CP1252 characters stored inside the
database (even those the collation was cp850).
That was always possible (and unfortunately
all too common a practice) because:

A - It often just seemed to work.
B - Older applications didn't consider
collations and charset conversions.
and
C - Version 5.x did not do any charset conversions
[though sometimes a MS ODBC code page translator
driver was sometimes chosen in some cases]

You should check the `select cast( column as binary)`
of your values (or look at the data from an unload table)
to see which code page they match;

http://en.wikipedia.org/wiki/Code_page_1252
http://en.wikipedia.org/wiki/Code_page_850

If your ä,ö, and ü characters are E4 and higher then
you
have CP1252 chars inside you CP850 database
and should rebuild it as a CP1252 (or at least
winlatin1 if 1252 is not available) with the version
5.5 s\w and then do your upgrades.

[CP850 have those characters in the 0x81 through 0x94
range]

Thomas Hoffmann> wrote in message
news:4acf54a4.37d8.1681692777 (AT) sybase (DOT) com...

We can unload a Database from SQL Anywhere Vers. 5.5 into
a SQL 11 Database with the collation cp850 (charset
Windows-1252) with the unload-utility from Sybase SQL
Anywhere 11. But we don't can convert this SQL Anywhere 11
cp850 database in a SQL Anywhere UTF-8 database.

From Version 9.0 to 11.0 it works.

We have try:

dbunload -c
"uid=dba;pwd=XXX;charset=cp850;dbf=customer.db "
-ac
"uid=dba;pwd=sql;charset=UTF-8;dbf=newsql11.db"
-xx

The dbunload.exe have some problems with special signs
(ä,ö,ü etc.)

Can you help us?

Thank you!


Reply With Quote
  #4  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: SQL 5.5 cp850 convert to SQL 11 utf8 DB - 10-14-2009 , 06:06 PM



Hmmm .... So you do have CP850 characters
inside the database.

Are you sure you used only the V11 dbunload
here??? [your mentioning of modifying the .DAT
file, another posting about GRANT CONNECT
of encrypted passwords and this result, all
indicate you used the V5 dbunload to start
a manual rebuild]

There is a good change that using just the
V11 dbunload can do the job directly!



<It's cp850!> wrote


We have those characters in the 0x81 through 0x94 rang.
And after the unload to SQL11 utf8, we have the same
characters for the "ä"!(0x84 instead 0xC3A4)

Do we really have to develop a program that converts these
characters in the export DAT file in a correct format?

Quote:
This sounds like an old problem that is somewhat
self inflicted; but all too common. The effect is
the bits-in are not the same as their interpretation
or the collation.

It was very common for users of an older
version to say the database is using a cp850
collation (or winlatin1 or something else
entirely) but then stuff local system charset
based characters into the database tables and
assume that it was perfectly normal. Unfortunately
that was often standard practice back then. It
was also all too easy to just do that and not
understand that was actually occurring.

In your case I would assume you actually
have CP1252 characters stored inside the
database (even those the collation was cp850).
That was always possible (and unfortunately
all too common a practice) because:

A - It often just seemed to work.
B - Older applications didn't consider
collations and charset conversions.
and
C - Version 5.x did not do any charset conversions
[though sometimes a MS ODBC code page translator
driver was sometimes chosen in some cases]

You should check the `select cast( column as binary)`
of your values (or look at the data from an unload table)
to see which code page they match;

http://en.wikipedia.org/wiki/Code_page_1252
http://en.wikipedia.org/wiki/Code_page_850

If your ä,ö, and ü characters are E4 and higher then
you
have CP1252 chars inside you CP850 database
and should rebuild it as a CP1252 (or at least
winlatin1 if 1252 is not available) with the version
5.5 s\w and then do your upgrades.

[CP850 have those characters in the 0x81 through 0x94
range]

Thomas Hoffmann> wrote in message
news:4acf54a4.37d8.1681692777 (AT) sybase (DOT) com...

We can unload a Database from SQL Anywhere Vers. 5.5 into
a SQL 11 Database with the collation cp850 (charset
Windows-1252) with the unload-utility from Sybase SQL
Anywhere 11. But we don't can convert this SQL Anywhere 11
cp850 database in a SQL Anywhere UTF-8 database.

From Version 9.0 to 11.0 it works.

We have try:

dbunload -c
"uid=dba;pwd=XXX;charset=cp850;dbf=customer.db "
-ac
"uid=dba;pwd=sql;charset=UTF-8;dbf=newsql11.db"
-xx

The dbunload.exe have some problems with special signs
(ä,ö,ü etc.)

Can you help us?

Thank you!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.