dbTalk Databases Forums  

Spanish Characters

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


Discuss Spanish Characters in the sybase.public.sqlanywhere.general forum.



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

Default Spanish Characters - 08-11-2009 , 03:49 PM






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??

Reply With Quote
  #2  
Old   
John Smirnios [Sybase]
 
Posts: n/a

Default Re: Spanish Characters - 08-11-2009 , 07:18 PM






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:
Quote:
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??


Reply With Quote
  #3  
Old   
NullZer0
 
Posts: n/a

Default Re: Spanish Characters - 08-12-2009 , 09:17 AM



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...
Quote:
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??

Reply With Quote
  #4  
Old   
John Smirnios [Sybase]
 
Posts: n/a

Default Re: Spanish Characters - 08-12-2009 , 09:57 AM



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:
Quote:
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??


Reply With Quote
  #5  
Old   
NullZer0
 
Posts: n/a

Default Re: Spanish Characters - 08-18-2009 , 07:08 AM



Thanks a Lot!!! It Works!!




"John Smirnios [Sybase]" <smirnios_at_sybase.com> escribió en el mensaje
news:4a82d83c$1 (AT) forums-3-dub (DOT) sybase.com...
Quote:
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??

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.