arabic

How to show Arabic text on TextView on Android?

送分小仙女□ 提交于 2020-01-01 19:57:08
问题 In android Textview arabic text is not displaying properly it is breaking a word into alphabets. Is there any library or another way to resolve this issue? 回答1: you can use Farsi Class to do this. import android.content.Context; import android.graphics.Typeface; public final class Farsi { public static boolean isFarsiConversionNeeded = true; private final static String szLamAndAlef = Character .toString((char) 0xfedf) + Character.toString((char) 0xfe8e); // Lam + Alef private final static

Rails 3 change default english numbers to arabic numbers

浪子不回头ぞ 提交于 2020-01-01 19:48:06
问题 I want to change the default numbers from english to arabic when the user switches to the arabic interface. 13 => ١٣ 89 => ٨٩ What is the best way to tackle this problem? 回答1: I add in helper module ARABIC_NUMBERS = %w(٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩) def ta numbers numbers = numbers.to_s if numbers.is_a? Integer results = numbers.chars.map { |char| ARABIC_NUMBERS[char.to_i] }.join end 回答2: Check this code : https://github.com/gdotdesign/rails-arabic-convert/blob/master/app/helpers/convert_helper.rb. It

Display dates in Arabic

こ雲淡風輕ζ 提交于 2020-01-01 05:27:06
问题 Here's my code: setlocale( LC_ALL,'ar' ); echo strftime( '%e %b, %Y', strtotime( '2011-10-25' )); Output: 25 Sep, 2011 Why is it not displaying the arabic date? Am I using strftime incorrectly? 回答1: AFAIK setlocale won't actually do any language translation for you but rather affects things like the formatting and comparator functionality. If you want localisation then you could try using IntlDateFormatter which may give you what you need. Updated: You could also try Zend_Date as suggested in

Itext Arabic Font coming as question marks

只谈情不闲聊 提交于 2019-12-31 03:08:04
问题 I am new to iText library. I have a requirement where i need to provide the output as PDF. The pdf has Arabic characters in it. I created a test servlet as given below. public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType ("application/pdf;charset=UTF-8"); Document document = new Document(); try{ PdfWriter.getInstance(document, response.getOutputStream()); // Code 2 document.open(); Font f1; BaseFont bf =

Print Arabic or other charset in System.out

时光怂恿深爱的人放手 提交于 2019-12-31 02:42:26
问题 I'm tyring to print a String with Arabic characters: private static void print(String msg, Object... args) { try { PrintStream ps = new PrintStream(System.out, true, "ISO-8859-6"); ps.println(String.format(msg, args)); } catch (UnsupportedEncodingException error) { System.err.println(error); System.exit(0); } } However, I see from the Eclipse log console that the Arabic characters as displayed as series of these kind of characters èååêÒÉ What could be missing in my code? 回答1: try this:

EditText Hint doesn't appear in Arabic on Galaxy note 1 with Android ICS

折月煮酒 提交于 2019-12-31 01:58:05
问题 I have an arabic hint in which I want to set in EditText that I am using in Dialog... it worked fine for many devices except Galaxy note 1 which has Android ICS. Note 1 - I converted the language of phone to Arabic so it showed the Arabic hint. 2 - EditText on Activity screens worked fine but on a Dialog it doesn't show the hint in Arabic. The XML EditText in layout is: <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android

Set default Locale to DatePicker and TimePicker

两盒软妹~` 提交于 2019-12-31 01:19:06
问题 I'm using a DatePicker and a TimePicker in a custom Dialog . The functionality works fine, but I have a problem when I change the default Locale of the app to match the Arabic language. The problem is that the DatePicker and TimePicker are not localized on all Android versions. It works on Android versions 4.2.2 and higher. But It doesn't work on Android versions 4.1.2 And lower. I want to either change localization of DatePicker and TimePicker to English all the time, Or to change it to

Arabic language in android [closed]

微笑、不失礼 提交于 2019-12-30 11:12:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . android still not fully support Arabic language even in last version 2.3 and maybe not in 3.0 also any way i am programmer if i want to make it Arabic support how to start to make it fully support Arabic ? because i found some the companies like Samsung and HTC add fully Arabic

What is the range for Arabic-Indic Digits (Hindu–Arabic) numeral utf8 from 0 to 9

馋奶兔 提交于 2019-12-30 07:51:07
问题 What is the range for Arabic-Indic Digits (Hindu–Arabic) numeral utf8 from 0 to 9 for the use in regular expressions: to use in regex. 回答1: U+06F0–U+06F9. As can be easily seen when checking a Unicode code point chart or the Character Map. 回答2: finally I found the answer for only numbers: \x{0660}-\x{0669} for numbers and letters: \x{0600}-\x{06ff} Unicode 4.0 / ISO 10646 Plane 0 thanks you all. 来源: https://stackoverflow.com/questions/14834846/what-is-the-range-for-arabic-indic-digits-hindu

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

本小妞迷上赌 提交于 2019-12-28 19:18:23
问题 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 : بÙâزاÙÙÛÛâ 回答1: This is a fairly common problem caused by inconsistent encoding schemes when