SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Data Encoding Problem.. Need help from you guys!


Data Encoding Problem.. Need help from you guys!

Author
Message
voodzzz
voodzzz
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 1
Hi guys! I created a application before using classic ASP (www.adabpixel.com). This simple application saves arabic data, but the main problem I didnt notice is that it is saving the data in windows-1252 encoding. As a result, my data are all in unreadable format (ÇáÈßÓá ááÝäæä ÇáÑÞãíÉ). Im trying to reconstruct the whole application in .NET but the problem is I cant show the correct data. I already made my globalization settings to windows-1256 & windows-1252 (Vice Versa).

Is there a way I can change the encoding through T-SQL? I even tried copying it to another database with arabic as its standard format.

Hoping for your immediate reply on this matter.



Site Owners
Site Owners
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: Administrators
Points: 12703 Visits: 22
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
DSP-120308
DSP-120308
Right there with Babe
Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)

Group: General Forum Members
Points: 789 Visits: 323
You could try the bulk copy and set the codepage there.
Perry-300990
Perry-300990
Old Hand
Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)Old Hand (371 reputation)

Group: General Forum Members
Points: 371 Visits: 6
If you write the raw data into a text file, you can use iconv to do a simple conversion.

Check that your iconv supports the proprietary Microsoft Arabic codepage, if you want that one, like so:

$ iconv -l | grep 1256
CP1256 MS-ARAB WINDOWS-1256

Aha, my iconv supports the proprietary Microsoft page.

So, cat YourData.txt | iconv -f CP1256 -t UTF-8 > YourData_fixed_UTF8.txt

and you should get a nice UTF-8 version (UTF-8 is the version of Unicode used mostly on the Internet).

Or, if your source was actually encoded in the proprietary Microsoft DOS Arabic codepage, 720, use -- well, my iconv doesn't support 720, so I'm not sure.

Microsoft has a beta for Arabic codepage conversion

http://www.microsoft.com/middleeast/arabicdev/beta/converter/

but it's beta, probably neither Free nor Open Source, the download does not seem to include any documentation (there is a readme which says to run the setup, which I didn't do), and my guess is it does no more (and much less) than iconv.
suresh kumar V.c
suresh kumar V.c
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 18
Years pass by months pass by ,,no one gives any straight forward answer for this Collation problem while running BCP for the error ::Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Code page 720 is not supported by SQL Serverw00t
nourann
nourann
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 68
try to add the switch -c850 or -craw it worked for me
Good luck
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search