FAQ Database Discussion Community


Regular expression for persian(arabic) letters without any numbers

java,regex,arabic,persian
In Java i'm looking for a regular expression that accepts any Persian( or Arabic ) letters except any Persian ( or Arabic) numbers. In order to have only letters i found a very good regular expression: [\u0600-\u065F\u066A-\u06EF\u06FA-\u06FF] although it is true and works for me, But we know that we...

POST variable and persian characters

php,unicode,persian
i have a problem with $_POST variable when send persian character <?php if (isset($_POST['caption'])){ $captione = $_POST['caption']; // I sent ض from form $cap = str_replace('ض','you',$captione); echo $captione.'<br>'; //output ض echo $cap; //output ض }else{ loginForm(); } function loginForm(){ echo '<form id = "myform" action="t.php" method="POST">'; echo 'caption: <textarea id="user_data"...

Convert html with Persian characters to pdf using iTextSharp

c#,itextsharp,persian
I have a Html file that contains Persian characters. I eant to convert it to pdf using iTextSharp. I have written these lines to do it: string HTML = System.IO.File.ReadAllText(Server.MapPath("~/Misc/Html.txt")); Document document = new Document(); string fontpath = Server.MapPath("~/Fonts/BNazanin.ttf"); iTextSharp.text.FontFactory.Register(fontpath); PdfWriter.GetInstance(document, new FileStream(Server.MapPath("~/Files/Pdf/test.pdf"), FileMode.Create)); document.Open(); try { iTextSharp.text.html.simpleparser.StyleSheet styles =...

How to comment in a Right to left language in Visual studio IDE

visual-studio,comments,persian,farsi,rtl
I want to comment in visual studio in Persian (which is a right to left language) like this: //.برای نگهداری مقدار اولیه ی کالا می باشد value_ متغیر But it seems the code editor does not support RTL languages and reorders the words so the result is : //متغیر _value...

How to convert english numbers inside a string to Persian/Arabic numbers in Objective-C?

objective-c,arabic,persian
I have an english string that may or may not have numbers. But i want those numbers to be printed on screen as Persian numbers. For example if NSString *foo = @"a string with numbers 1 2 3;" then output should be a string with numbers ۱۲۳ The code I'm...

Text.BoringLayout WIDTH is set to 0 (not showing) in Android TextView When I have an non-English text?

android,android-layout,textview,arabic,persian
I have an Android Widget TextView, when I setText with Persian charachters, it just not showing! and I guess the mBoring (Text.BoringLayout property) is responsible, because the width is set 0. there is no problem when I set english + persian strign, and the width set to proper value such...

ZipEntry() and converting persian filenames

vb.net,persian,sharpziplib
In my vb.net project I'm trying to add a file with a Persian name to a zip file and I do this with the code bellow: Dim myentry As New ZipEntry(dr.Item("MyFile").ToString()) zipOut.PutNextEntry(myentry) however when I open the zip file I see the file name is changed to a gibberish Is...

How convert Gregorian date to Persian date?

c#,date,gregorian-calendar,date-conversion,persian
I want to convert a custom Gregorian date to Persian date in C#. For example, i have a string with this contents: string GregorianDate = "Saturday, October 24, 2013"; Now i want to have: string PersianDate = پنج‌شنبه 2 آبان 1392 ; or string PersianDate = 1392/08/02 Thanks...