![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I migrated a SQL Anywhere 5.5 Database to SQL Anywhere 11.0.1 using unload, but the problem is now I can't see the spanish characters in data. what can I do to solve this?? |
#3
| |||
| |||
|
|
The chances are that the encoding of the data in your 5.5 database did not match the collation that you initialized the database with. 5.5 didn't do any character set translation -- it just trusted that the data being inserted was encoded correctly. V11 does do charset translation and if the collation label doesn't match the actual encoding of the data, characters will not be translated correctly. So, what collation was your 5.5 database created with? What character set is your data actually encoded in (in these cases, that's usually the same as your OS charset, but not necessarily)? Let's say your 5.5 database was created with 819ESP but the data is actually encoded in CP1252. Use dbunload to unload the database to files (not do an automatic reload). In reload.sql, change all references to ENCODING 819 (actually, it probably appearing as ISO_8859-1:1987) on the LOAD TABLE statement to the actual encoding of the data (windows-1252 in this example). Create a new database with the right collation (1252LATIN1 in this example) then run reload.sql. -john. -- John Smirnios Senior Software Developer iAnywhere Solutions Engineering Whitepapers, TechDocs, bug fixes are all available through the iAnywhere Developer Community at http://www.ianywhere.com/developer NullZer0 wrote: Hi, I migrated a SQL Anywhere 5.5 Database to SQL Anywhere 11.0.1 using unload, but the problem is now I can't see the spanish characters in data. what can I do to solve this?? |
#4
| |||
| |||
|
|
Look, the information is: Original DB: Collation: Code Page 850, ASCII, Multilingual Version 5.0.3 (It's not 5.5!) New DB: CHAR Collation sequence: 437 CHAR character set encoding: IBM850 CHAR case sensitivity: Ignore NCHAR collation sequence: UCA NCHAR character set encoding: UTF-8 NCHAR case sensitivity: Ignore Version 11.0.1 If I do a New DB Unload and edit one .dat file, I can see text data with spanish characters, no problems!!!. It can be some parameter in connection profile?? or I have to do a Manual Unload-Reload? Thanks for your support and help!! "John Smirnios [Sybase]" <smirnios_at_sybase.com> escribió en el mensaje news:4a820a59$2 (AT) forums-3-dub (DOT) sybase.com... The chances are that the encoding of the data in your 5.5 database did not match the collation that you initialized the database with. 5.5 didn't do any character set translation -- it just trusted that the data being inserted was encoded correctly. V11 does do charset translation and if the collation label doesn't match the actual encoding of the data, characters will not be translated correctly. So, what collation was your 5.5 database created with? What character set is your data actually encoded in (in these cases, that's usually the same as your OS charset, but not necessarily)? Let's say your 5.5 database was created with 819ESP but the data is actually encoded in CP1252. Use dbunload to unload the database to files (not do an automatic reload). In reload.sql, change all references to ENCODING 819 (actually, it probably appearing as ISO_8859-1:1987) on the LOAD TABLE statement to the actual encoding of the data (windows-1252 in this example). Create a new database with the right collation (1252LATIN1 in this example) then run reload.sql. -john. -- John Smirnios Senior Software Developer iAnywhere Solutions Engineering Whitepapers, TechDocs, bug fixes are all available through the iAnywhere Developer Community at http://www.ianywhere.com/developer NullZer0 wrote: Hi, I migrated a SQL Anywhere 5.5 Database to SQL Anywhere 11.0.1 using unload, but the problem is now I can't see the spanish characters in data. what can I do to solve this?? |
#5
| |||
| |||
|
|
It's definitely bizarre that your char collation sequence claims to be "437" but the encoding is "IBM850". That's very peculiar but shouldn't prevent you from transferring your data. How are you viewing the .dat file: in a console app or a GUI app (such as notepad)? Assuming it is a GUI app, that means that your data is in OS ANSI (GUI) charset which almost certainly is neither 437 nor 850 so you don't want to tell v11 that your data is in 850. The easiest way I can think of to find out what the OS ANSI charset is is to run "dbinit foo.db" from a command line and tell me what we choose as the CHAR collation. I'm going to guess 1252LATIN1. Now follow the instructions I gave before: Unload the data to files. For example: dbunload -c "dbf=oldv5.db" data Edit reload.sql and change ENCODING 'cp850' to ENCODING 'windows-1252' -- assuming 1252 is your OS charset Create a new database dbinit [options] new.db or dbinit -z whatever_collation_you_want [other options] new.db Run reload.sql dbisql -c "dbf=new.db" read reload.sql -john. -- John Smirnios Senior Software Developer iAnywhere Solutions Engineering Whitepapers, TechDocs, bug fixes are all available through the iAnywhere Developer Community at http://www.ianywhere.com/developer NullZer0 wrote: Look, the information is: Original DB: Collation: Code Page 850, ASCII, Multilingual Version 5.0.3 (It's not 5.5!) New DB: CHAR Collation sequence: 437 CHAR character set encoding: IBM850 CHAR case sensitivity: Ignore NCHAR collation sequence: UCA NCHAR character set encoding: UTF-8 NCHAR case sensitivity: Ignore Version 11.0.1 If I do a New DB Unload and edit one .dat file, I can see text data with spanish characters, no problems!!!. It can be some parameter in connection profile?? or I have to do a Manual Unload-Reload? Thanks for your support and help!! "John Smirnios [Sybase]" <smirnios_at_sybase.com> escribió en el mensaje news:4a820a59$2 (AT) forums-3-dub (DOT) sybase.com... The chances are that the encoding of the data in your 5.5 database did not match the collation that you initialized the database with. 5.5 didn't do any character set translation -- it just trusted that the data being inserted was encoded correctly. V11 does do charset translation and if the collation label doesn't match the actual encoding of the data, characters will not be translated correctly. So, what collation was your 5.5 database created with? What character set is your data actually encoded in (in these cases, that's usually the same as your OS charset, but not necessarily)? Let's say your 5.5 database was created with 819ESP but the data is actually encoded in CP1252. Use dbunload to unload the database to files (not do an automatic reload). In reload.sql, change all references to ENCODING 819 (actually, it probably appearing as ISO_8859-1:1987) on the LOAD TABLE statement to the actual encoding of the data (windows-1252 in this example). Create a new database with the right collation (1252LATIN1 in this example) then run reload.sql. -john. -- John Smirnios Senior Software Developer iAnywhere Solutions Engineering Whitepapers, TechDocs, bug fixes are all available through the iAnywhere Developer Community at http://www.ianywhere.com/developer NullZer0 wrote: Hi, I migrated a SQL Anywhere 5.5 Database to SQL Anywhere 11.0.1 using unload, but the problem is now I can't see the spanish characters in data. what can I do to solve this?? |
![]() |
| Thread Tools | |
| Display Modes | |
| |