Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help: Inserting non-english(Hebrew) characters

Author  Topic 

tarzan007
Starting Member

2 Posts

Posted - 2008-03-31 : 12:31:14
Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

tarzan007
Starting Member

2 Posts

Posted - 2008-03-31 : 12:32:41
while creating the database, I have specified the COLLATE as SQL_Latin1_General_Cp1255_CI_AS.
And regarding determining if the values coming from database is junk or not, i am downloading/extracting the data from the database into a MS Excel format file and also into a html file. At both the places i get junk characters.

Here is my database creation script
CREATE DATABASE [JSP_TRANSLATE_DB] ON (NAME = N'JSP_TRANSLATE_DB_Data', FILENAME = N'D:\JSP_TRANSLATE_DB\JSP_TRANSLATE_DB_Data.MDF' , SIZE = 21, FILEGROWTH = 10%) LOG ON (NAME = N'JSP_TRANSLATE_DB_Log', FILENAME = N'D:\JSP_TRANSLATE_DB\JSP_TRANSLATE_DB_Log.LDF' , SIZE = 56, FILEGROWTH = 10%)

COLLATE SQL_Latin1_General_CP1255_CI_AS

GO


In order to make sure that charset encoding for html can accomodate Hebrew characters, I added

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-8">


while creating the html. It did ask for Hebrew fonts to be installed for IE and I did that. Unfortunately, the Hebrew characters are still not getting displayed properly (different junk characters getting displayed now).
Charset=ISO-8859-8 is for Hebrew, but if that corresponds to CP-1255 or not I am not sure
Go to Top of Page

GhantaBro
Posting Yak Master

215 Posts

Posted - 2008-03-31 : 12:50:57
how about using nvarchar?
Go to Top of Page
   

- Advertisement -