persian

How to support Arabic text in Android?

余生颓废 提交于 2019-11-29 06:00:27
I am getting Arabic text from server successfully. Retrieved text I want display in code but its showing boxes instead of Arabic text. Assume that t array values are Arabic text from server. string[] t={" "}; Textview tv = (Textview) findviewByid(R.id.text); tv.setText(t[0]); Android 2.1 does not have Arabic font. Android 2.2 has Arabic font but does not show your word correctly. Android 3.x supports Arabic completely. For Android 2.1 you must set the typeface Farsi.GetFarsiFont(this) and then use Farsi.Convert("سلام") For Android 2.2 you do not need setting font but must use Farsi.Convert(

How convert Gregorian date to Persian date?

安稳与你 提交于 2019-11-29 04:35:49
问题 I want to convert a custom Gregorian date to Persian date in C#. For example, i have a string with this contents: string GregorianDate = "Thursday, October 24, 2013"; Now i want to have: string PersianDate = پنج‌شنبه 2 آبان 1392 ; or string PersianDate = 1392/08/02 Thanks 回答1: Use the PersianCalendar: string GregorianDate = "Thursday, October 24, 2013"; DateTime d = DateTime.Parse(GregorianDate); PersianCalendar pc = new PersianCalendar(); Console.WriteLine(string.Format("{0}/{1}/{2}", pc

using preg_match to detect persian (farsi) characters in string

送分小仙女□ 提交于 2019-11-29 02:56:18
问题 I am trying to validate form data from server-side. my interest is that the user just fill the form by Persian characters. I am using this code: $name=trim($_POST['name']); $name= mysql_real_escape_string($name); if (preg_match('/^[\u0600-\u06FF]+$/',str_replace("\\\\","",$name))){$err.= "Please use Persian characters!";} but it is not working! here is a warning: Warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \U, or \u at offset 3 in C:

Restore MySQL DB with Unicode characters (Arabic and Kurdish) in .gz format

懵懂的女人 提交于 2019-11-28 11:50:27
I have a MySQL backup file in .gz format that was created by the backup wizard in cPanel. When the restoration is done by the backup wizard, contents with Arabic and Kurdish characters do not show correctly, even though I changed the collation to different UTF-8 encoding in PhpMyadmin. For example, the real data in DB is : كامپى زانكۆ and the data showed after the restoring become to this : بÙâزاÙÙÛÛâ This is a fairly common problem caused by inconsistent encoding schemes when creating and exporting the database. Here is the simplest way to solve it: Import your backup file Export it again,

Insert a persian text in mysql table

扶醉桌前 提交于 2019-11-28 11:40:38
I want to store values of a form (in php) into mysql , one field is text and values of this field is in persian language , when I insert data to table this persian text stores in this shape : ??????? I use these codes but it isn't work properly mysql_set_charset('utf8',$db); mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8_persian_ci"); tables ,database and columns has utf8_persian_ci collation make sure the collation is utf8. collation persiab case insensitive may not work properly as the input char code may not be in range of persian charachters. unicode 8 will work. change

MS Word VBA to display Unicode strings

早过忘川 提交于 2019-11-28 02:21:19
We have some VBA code in MS Word 2010 which needs to display Persian (Farsi) words dynamically; in other words, depending on which buttons the user clicks on the VBA app window, we will display a different string of Persian. The only way we discovered to do this was to use something like this and concatenate a very long string character by character: the ChrW(&633) . Do you know another way we can do this? The strings will remain the same, but we need a couple of different ones. Can they be loaded from a file? Your help is much appreciated. Thanks. Lets have an UTF-8 text file unicode.txt , a

How to support Arabic text in Android?

こ雲淡風輕ζ 提交于 2019-11-27 23:33:52
问题 I am getting Arabic text from server successfully. Retrieved text I want display in code but its showing boxes instead of Arabic text. Assume that t array values are Arabic text from server. string[] t={" "}; Textview tv = (Textview) findviewByid(R.id.text); tv.setText(t[0]); 回答1: Android 2.1 does not have Arabic font. Android 2.2 has Arabic font but does not show your word correctly. Android 3.x supports Arabic completely. For Android 2.1 you must set the typeface Farsi.GetFarsiFont(this)

Twitter Bootstrap CSS that support from RTL languages

﹥>﹥吖頭↗ 提交于 2019-11-27 17:59:25
I just discover Twitter Bootstrap and I'm wondering if there is a right-to-left (RTL) version of it. Does anyone know? I would suggest this http://pyjamacoder.com/2012/02/01/twitter-bootstrap-v2-rtl-edition/ Demo: http://donaldducky.github.com/bootstrap-rtl/ Shimon S I like this: http://rbootstrap.ir/ It works really well. For Bootstrap 3 ; I recommend this library . It works on top of Bootstrap core (think of it as a Bootstrap theme) which gives you the advantage of keeping Bootstrap core up-to-date without losing the RTL support. For Bootstrap 2 ; I would suggest this repository . It works

Twitter Bootstrap CSS that support from RTL languages

坚强是说给别人听的谎言 提交于 2019-11-27 04:15:18
问题 I just discover Twitter Bootstrap and I'm wondering if there is a right-to-left (RTL) version of it. Does anyone know? 回答1: I would suggest this http://pyjamacoder.com/2012/02/01/twitter-bootstrap-v2-rtl-edition/ Demo: http://donaldducky.github.com/bootstrap-rtl/ 回答2: I like this: http://rbootstrap.ir/ It works really well. 回答3: For Bootstrap 3 ; I recommend this library. It works on top of Bootstrap core (think of it as a Bootstrap theme) which gives you the advantage of keeping Bootstrap

How to print DateTime in Persian format in C#

二次信任 提交于 2019-11-27 01:31:27
问题 What is the simplest way to print c# DateTime in Persian? currently I'm using : static public string PersianDateString(DateTime d) { CultureInfo faIR = new CultureInfo("fa-IR"); faIR.DateTimeFormat.Calendar = new PersianCalendar(); return d.ToString("yyyy/MM/dd", faIR); } Which throws an exception Not a valid calendar for the given culture 回答1: First you must note that you cannot put a Jalali Date in a DateTime object, you will get an exception in dates like "1392/02/31". So you must handle