Reputation: 1272
When I insert Hebrew words to the database, I get ????? marks after i click "show Table" in Server Explorer.
Is there a way to Encode the hebrew letters before they go in?
sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbType.VarChar, 50);
sqlCommand.Parameters["@HebrewLettersEncoded"].Value = HebrewLettersTextBox1Output.Text;
I am thinking that there should be some encoder that will encode - HebrewLettersTextBox1Output.Text
Upvotes: 1
Views: 1226
Reputation: 10882
You'll need to make sure the field you are trying to put the characters into is an NVarChar (not varchar). Then change the code above to....:
sqlCommand.Parameters.Add("@HebrewLettersEncoded", SqlDbType.NVarChar, 50);
Upvotes: 2
Reputation: 29527
You'll want an nvarchar field instead of a varchar. Hebrew characters aren't in plain ASCII, so you'll need unicode to represent them, unless you want to do ugly code page selection.
Upvotes: 1