1

I had an application that used a Sybase ASA 8 database. However, the application is not working anymore and the vendor went out of business.

Therefore, I've been trying to extract the data from the database, which has Arabic characters. When I connect to the database and display the contents, Arabic characters do not display correctly; instead, it looks something like ÇáÏãÇã.

Which is incorrect. I tried to export the data to a text file. Same result. Tried to save the text file with UTF-8 encoding, but to no avail.

I have no idea what collation the tables are set to. Is there a way to export the data correctly, or convert it to the correct encoding?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Firas
  • 41
  • 1
  • 6

3 Answers3

2

the problem was solved by exporting the data from the database using "Windows-1252" encoding, and then importing it to other applications with "Windows-1256" encoding.

Firas
  • 41
  • 1
  • 6
0

First export by setting Encoding to UTF-8

Open then resultant sql file in notepad++. In notepad++ select the Encoding as Encode to UTF-8.

0

When you connect to the database, use the CHARSET=UTF-8 connection parameter. That will tell the server to convert the data to UTF-8 before sending it to the client application. Then you can save the data from the client to a file.

This, of course, is assuming that the data was saved with the correct character set to begin with. If it wasn't, you may be out of luck.

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121
  • Thanks for your response. When I tried to change the paramater it was rejected with the following message "Long Message: JZ0I5: An unrecognized CHARSET property was specified: UTF-8." I also tried with UTF8 and UTF8BIN. However, the problem was solved when I exported the data from the database using "Windows-1252" encoding, and then importing it to other applications with "Windows-1256" encoding. – Firas Feb 07 '12 at 11:40