Home » Windows OS

Problem with Arabic and Persian Characters

Hi everybody

I have a field typed nvarchar() in SQL Server 2008 and it's valued with some characters that contain '?'. But when I search the table with a query with where-clause LIKE '%?%'  or LIKE '%?%' it doesnt return any rows. Even when I copy the exact value from the table to the query, it dos not return any row. There is no problem with varchar datatype. can anybody help me?


1 Answer Found


Answer 1

If you add N just before the search string such as





hi guys!

   I am trying to get the the glyph converted unicode details for the Arabic Text " ??????????" ( Unicode : 0627, 0644, 0625 ,0646 ,062C, 0644 ,064A, 0632, 064A ,0629 ) .

After converion the string unicode will be like FE94,FEF3,FEB0,FEF4,FEE0, FEA0 ,FEE7,FEF9,627 ( Contextual substitution of arabic characters)
   Is there any way i can get these unicode details of the string after Contextual substitution using VB

Thanks in Advance



I want to submit an application which has Arabic/Persian support without any requirements from OS. Also I used Open Source (GNU/GPL) Arabic Font to display texts. All Complex Scripting handles within my source code and it doesn't need ANY requirements! I don't have any input from user in Arabic or Persian and its only User Interface which displays Arabic/Persian words. Application is capable of switching between English, Arabic and Persian within Configuration Tab and do not detect any Culture information from OS. For using Arabic font I didn't copy Font to windows folder and it stays within application folder wherever it installs. For using Arabic font I call "AddFontResource" from coredll.dll, and before closing application I unload it with "RemoveFontResource" in coredll.dll!

My questions are:

1. Can I submit application which switch between languages which not listed in Mobile Market Place?
2. Can I use GNU/GPL arabic font within my application?
3. Can I run AddFontResource and RemoveFontResource from coredll.dll and passing certification process?
4. Can I have multi-language application with language which not supported by OS?

I really appreciate any response, especially if someone within certification process helps me to make sure that I'm not doing something that cost me $99 for nothing!


hi ..

while using IE9 , i faced that IE9 cant deal so well with some arabic websites and forums ..

like on of the most sport arabic sport website . www.kooora.com ...

the IE9 can show any arabic characters .. it shows only english and special chacters and spaces instead of arabic characters ..

i will upload now 2 pix of IE9 and Firefox .

here is the link :


plz help to fix .. i liked the browser .. but i faced this annoying problem

thnx for ur great efforts !


what send to me?
hello, I have question with arabic characters in Word 2007.
when I create a word document with arabic character (unicode 0x645) it is replaced when saved with a character code 0xe3 from arabic code page. Why is this neccessary with unicode support word? My problem is, that I generate a Word Document (from another application than word), I would have know which characters can be written directly as unicodes (in RTF with \u command) or must be replaced by charcodes from an code page. If I do not in this case the character 0x645 is displayed correctly but at the wrong position in a word. The Font I Used is arial. The Words written are 0x654,0xfedf,0xfe8e,0xfecc,0xfedf,0xfe8d,0x0020,0xfe8e,0xfe91,0xfea3,0xfead,0xfee3. The fist char is displayed at the end of first word, while all other characters are at correct position. Is there a general rule for replacing such characters?

(If this question belongs in a different forum, just let me know.  Thanks)

platform: Windows 7 Enterprise
OS language: English

I am maintaining some code that builds a unicode file name by appending a numeric id
enclosed in square brackets.  Here is an example: my_file_name[1234].txt.  Then
a file is created using that name.
When the file name contains Arabic characters, Windows Explorer does not display the
file name as our QA people expect.  Here is a mock example:
  Given this file name: arabic[1234].txt, where 'arabic' is actually some unicode Arabic characters;
  Windows Explorer displays: 1234]cibara].txt
  Our QA people are expecting something more like this: [1234]cibara.txt
Here are the actual bytes of the file name string as they appear in memory (little endian):
44 06 25 06 27 06 47 06 33 06 20 00 47 06 5b 00 31 00 32 00 33 00 34 00 5d 00 2e 00 74 00 78 00 74 00

** Disclaimer: I have no idea what these Arabic characters spell, if anything.
** If these characters spell something offensive, please accept my apologies.

Here, the bytes are shown as unicode characters:
0644 - first Arabic character.       let's refer to this character as a
0625 - second Arabic character.  let's refer to this character as b
0627 - third  "                            let's refer to this character as c
0647 - fourth "                           let's refer to this character as d
0633 - fifth  "                             let's refer to this character as e
0020 - space
0647 - sixth Arabic character      let's refer to this character as f
005b - '['
0031 - '1'
0032 - '2'
0033 - '3'
0034 - '4'
005d - ']'
002e - '.'
0074 - 't'
0078 - 'x'
0074 - 't'

Windows explorer displays this as:    1234]f edcba].txt
QA thinks it should display like this: [1234]f edcba.txt

Is Windows Explorer displaying the string incorrectly?  (It looks wrong to me)
Should different unicode characters be used to represent the square brackets?
What is the correct fix for this problem?

Thanks for your help.



How do i display arabic data in correct format?

The following information(fig -1) is displayed correctly in crystal reports viewer but when i export the report in to word or pdf, using the export feature in cr viewer, iam getting a differnt output (fig -2). 

??????? ???? ? ???
fig -1 - crystal report viewer

? ???? ? ?????

fig -2 - export to word/pdf
Kindly help me



I have a strange problem when trying to read arabic values in a DB2 database with DbDataReader with ADO .NET and also after that with Recordset object coming from ADODB 2.8.

With DbDataReader I receive garbage values : " Âú´ï´ß[ ÂÍú["

With Recordset I receive the correct arabic values : " ??????? ????"

Of course I am using the same connection string and the same query.

The driver is an ODBC driver (IBM Client Access).

Somebody to explain this different behavior with these 2 methods ?

Thanks a lot



i am using sql server 2008 and i have a database with Persian_100_CS_AS collation.

i chosed this collation to store persian dates.

it works correctly for most dates (such as 1370-05-02 , 1370-02-01) but for some persian dates (such as 1370-02-30 , ) does not !

when ever i try to insert such values the following messeage were shown.

"the changed value in this cell was not recognized as valid .net framework Data Type:DataTime".

any ideas?

thanks in advance.




Hello all

Could I please ask - how do I go about inserting into a database special characters such as the uppercase O, umlaut 


Please understand that I have been able to insert the special character from inside MMS by putting an N in front of the value

but when I run the  SQL file from inside an ASP.net 4.0 page it comes up as a diamond with a question mark in it

Does anyone have any idea how I would be able to acheive this?


I used Interop Form Tools Installer and VB.NET 2008 to create "Interop Form Controles library" it is done no problem, but when used this controls in VB6 the all textbox not supported Arabic language.

Thanks for help.
Basem Sayed

Hi everyone, I am having issues with the Arabic language when trying to display dates and times.  I seem to be unable to get the formatting to work on a date, or on a time, but it works on a date and time.  Other languages seem to be fine. Any thoughts on why this is? (see image link below)

Also, the Arabic formatted date is very different than the normal date (e.g. 8/20/2010 is showing as 10/09/31).  Is this accurate?

Here's the result of the code below:



Here's my code:

Dim messageText As String
    Dim englishCulture As Globalization.CultureInfo = New Globalization.CultureInfo("en-US")
    Dim spanishCulture As Globalization.CultureInfo = New Globalization.CultureInfo("es-ES")
    Dim arabicCulture As Globalization.CultureInfo = New Globalization.CultureInfo("ar-SA")
    Dim hebrewCulture As Globalization.CultureInfo = New Globalization.CultureInfo("he-IL")

    messageText &= "English example: "
    messageText &= Now.ToString(englishCulture.DateTimeFormat) & Environment.NewLine
    messageText &= Now.ToString(englishCulture.DateTimeFormat.ShortDatePattern) & Environment.NewLine
    messageText &= Now.ToString(englishCulture.DateTimeFormat.LongTimePattern) & Environment.NewLine
    messageText &= Environment.NewLine

    messageText &= "Spanish example: "
    messageText &= Now.ToString(spanishCulture.DateTimeFormat) & Environment.NewLine
    messageText &= Now.ToString(spanishCulture.DateTimeFormat.ShortDatePattern) & Environment.NewLine
    messageText &= Now.ToString(spanishCulture.DateTimeFormat.LongTimePattern) & Environment.NewLine
    messageText &= Environment.NewLine

    messageText &= "Arabic example: "
    messageText &= Now.ToString(arabicCulture.DateTimeFormat) & Environment.NewLine
    messageText &= Now.ToString(arabicCulture.DateTimeFormat.ShortDatePattern) & Environment.NewLine
    messageText &= Now.ToString(arabicCulture.DateTimeFormat.LongTimePattern) & Environment.NewLine
    messageText &= Environment.NewLine

    messageText &= "Hebrew example: "
    messageText &= Now.ToString(hebrewCulture.DateTimeFormat) & Environment.NewLine
    messageText &= Now.ToString(hebrewCulture.DateTimeFormat.ShortDatePattern) & Environment.NewLine
    messageText &= Now.ToString(hebrewCulture.DateTimeFormat.LongTimePattern) & Environment.NewLine


Thanks for any advice!


http://www.spudgames.com (flash games) http://www.tallyme.com (free dating and picture rating)


I want to insert date value in database

when my page loads i am setting the culture into ar-sa

and when insert date i am getting the problem

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

Public Sub Add_Date(ByVal title As String, ByVal Schedule_date As Date)
            command.CommandText = "sp_Schedule_DML"
            command.CommandType = CommandType.StoredProcedure
            If Schedule_date = Nothing Then
                command.Parameters.AddWithValue("@optSelect", 0)
                command.Parameters.AddWithValue("@title", title)
                command.Parameters.AddWithValue("@sdate", System.DBNull.Value)
                command.Parameters.AddWithValue("@optSelect", 0)
                command.Parameters.AddWithValue("@title", title)
                command.Parameters.AddWithValue("@sdate", Schedule_date)
            End If
            If connection.State = Data.ConnectionState.Closed Then
            End If
            If connection.State = Data.ConnectionState.Open Then
            End If
        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try

stored procedure

ALTER  procedure [dbo].[sp_Schedule_DML]
@optselect int,
@title nvarchar(100),
@sdate datetime
if (@optselect=0) --Insert Schedule
insert into Schedules(title,scheduleDate,status) values(@title,@sdate,1)

ALTER  procedure [dbo].[sp_Schedule_DML]


@optselect int,

@title nvarchar(100),

@sdate datetime



if (@optselect=0) --Insert Schedule


insert into Schedules(title,scheduleDate,status) values(@title,@sdate,1)



I'm pleased to announce that we have an active Persian SharePoint Community for Persian language users around the world.
you can join us and sharing your knowledges and experiences about SharePoint products and technologies and related topics.

More Details :
Persian SharePoint Community
Persian SharePoint Forums
Persian SharePoint Blogs

Arash Aghajani
I want to develope persian calender and also persian language pack for sharepoint server ,
is anybody have a roadmap for this job ?

Hi all ,

What is the best solution for reading/writing Persian Date from/into SQL Server 2005 and do calculations on it?Note That I connect to sql server database from a .Net App.

Any help would be appreciated .

Thanks in advance.


i am developing a windows application with C#.

why all persian digits(numbers 0-9) were shown in english.

how i could display them in persian(farsi) format;


my question is that does microsoft provide persian calenadr in sharepoint 2010 beta 2 ?
as u know in .net 2.0 and above, microsoft has add support for persian canlendar with this class System.Globalization.PersianCalendar, and also add persian collation in sql server 2008, also some office addon's packages published to support persian languages in offuce 2003, 2007. but do not have offical support for persian calendar in sharepoint 2007. i hope this problem solve in 2010.
Honestly i request to managers to help me to0 accomplish this goal.
thanks in advance.

hi all


Can I use Persian calendar as primary or secondary calendar in outlook?




I'm working on a web site which will send a recovery password to the user who lost his/her password. It's no problem while I test it at my home, but always have problems while tested in office PC, says: {An invalid character was found in the mail header}. I searched for this on the net and find it seems a problem that many others encoutered, but I haven't found a solution from the net yet.

I would greatly appreciate any insight that could be offered.


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure