Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello I want to know how to write arabic in textbox asp.net using VB.net, also i need sql database column accept arabic language.

What I have tried:

ello I want to know how to write arabic in textbox asp.net using VB.net, also i need sql database column accept arabic language.  
Posted
Updated 1-Sep-18 23:57pm

1 solution

You have to use Unicode which is used by .NET already. For the web page you have to configure the encoding in the web.config file like:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
See also How to: Select an Encoding for ASP.NET Web Page Globalization[^].

With MS T-SQL you have to use the nchar and nvarchar (Transact-SQL) | Microsoft Docs[^] types to store Unicode text. For other database engines see their documentation.
 
Share this answer
 
Comments
Abdifatah supparka 17-Sep-18 13:52pm    
thanks ,for database it working but in browser not working it display ????.
Jochen Arndt 18-Sep-18 4:05am    
Then your web page is not properly configured for Unicode. When viewing the HTML source of the page in a browser (with Firefox for example use Ctrl+U), there should be a
<meta charset="utf-8">
or
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
tag in the header.

If that is present, there may be also wrong conversions somewhere in your server code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900