arabic

regular expression to detect numbers written as words - UTF-8 input

落爺英雄遲暮 提交于 2019-12-10 10:31:22
问题 thanks for the answers to : "regular expression to detect numbers written as words" : regular expression to detect numbers written as words I now have this working, however I have the same requirement but the numbers as words are in Arabic (or any other UTF-8) and not English, so : if (preg_match("/\p{L}\b(?:(?:واحد|اثنان|ثلاثة|أربعة|خمسة|ستة|سبعة|ثمانية|تسعة|صفر|عشرة)\b\s*?){4}/", $str, $matches) > 0) return true; Does not work - I've googled and there seems to be quite a few issues with

How to display Arabic dates in the Gregorian calendar?

强颜欢笑 提交于 2019-12-10 10:25:37
问题 I have a multilingual ASP.NET site; one of the languages is Arabic (ar-SA). To switch between cultures, I use this code: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Name) Thread.CurrentThread.CurrentUICulture = New CultureInfo(Name) When displaying the date of an article, for example, I just do this, and the localization API takes care of everything: <%#Eval("DatelineDate","{0:d MMMM yyyy}")%> The problem is that this displays dates using the Hijiri (Islamic)

PHP MYSQL Insert Data in Arabic Language

此生再无相见时 提交于 2019-12-09 18:24:09
问题 I am trying to insert some Arabic Language data into MySQL using PHP and an HTML form. When I insert the data in to MYSQL table, the table field represents data as مرحبا العالم . But when I access the same data with PHP and show it in my webpage, it shows the correct data. I am using: http-equiv="Content-Type" content="text/html; charset=utf-8" meta tag in my web page to show Arabic data. My question is why my data looks like this: مرحبا العالم in MySQL table, and how

Solr for Arabic

夙愿已清 提交于 2019-12-09 17:14:22
问题 I'm using Solr to index documents in 3 langues(arabic, french and english), I have used this fieldType : <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr

Right-to-Left Email

我的未来我决定 提交于 2019-12-09 15:15:54
问题 I'm trying to generate email from my code that will read correctly for people using right-to-left-reading languages such as Arabic. My question is: what are my options for acheiving this? I am aware that I can create a multipart email and encode the message body as "text/html", then specify a text direction in the <html> tag (e.g. <html dir="rtl"> ), but ideally I would like use plain-text email and not have to rely on HTML formatting, because not all users will have HTML support in their

FlyingSaucer LTR/RTL/BiDi issue with arabic text

我的未来我决定 提交于 2019-12-09 11:24:19
问题 I'm using flying saucer xhtmlrenderer for building pdf documents. Everything worked fine until now - now we should generate arabic text inside pdf. Xhtmlrenderer is rendering Arabic text in reverse order. I've read somewhere on internet (maybe on their own site) that xhtmlrenderer does not support bidi/rtl. But IText itself contains examples to work with arabic and hebrew via ColumnText and PdfPTable (sources can be found here: http://sourceforge.net/projects/itextpdf/files/Examples/examples

How many bytes do we need to store an arabic character

吃可爱长大的小学妹 提交于 2019-12-09 07:05:31
问题 I'm a little confused about the storage needed for representing an arabic character. Please let me know if this is true: in ISO/IEC 8859-6 encoding it takes 2 bytes (http://en.wikipedia.org/wiki/ISO/IEC_8859-6) in UNICODE it takes 4 bytes (http://en.wikipedia.org/wiki/Arabic_Unicode) What are the advantages of each encoding? When should we prefer one over another one? 回答1: Well first, Unicode is not an encoding. It is a standard for assigning code points to every character in every language.

CharInSet doesn't work with non English letters?

被刻印的时光 ゝ 提交于 2019-12-09 05:10:45
问题 I have updated an application from Delphi 2007 to Delphi 2010, everything went fine, except one statement that compiled fine but not working which is: If Edit1.Text[1] in ['S','س'] then ShowMessage('Found') else ShowMessage('Not Found') However, I knew that in will not, so I changed to CharInSet If CharinSet(Edit1.Text[1],['S','س']) then ShowMessage('Found') else ShowMessage('Not Found') but it never worked when the string is س , but always work with S , even I cast the edt1.Text1 with

Concatenating left and right-aligned character types

最后都变了- 提交于 2019-12-08 14:58:36
问题 It seems that a combinations of character types can produce unexpected results for the resulting order of an explicit paste operation: (x = paste(c('green','أحمر', 'أزرق'), collapse=' ')) # arabic for blue and red #> [1] "green أحمر أزرق" paste(x, 'yellow') #> [1] "green أحمر أزرق yellow" paste(x, 123) #> [1] "green أحمر أزرق 123" Is there any known solution to this - i.e. a way to ensure concatenation in the same sequence as the arguments are given? Perhaps the answer is don't concatenate

Silverlight 5 input language override issue in Chrome/Firefox

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 08:23:10
问题 Working on a fairly large Silverlight project I have an issue with Chrome/Firefox not respecting the input language set by the user. In IE, if I change the keyboard language to Arabic, the input is in Arabic. If I do this while running the Silverlight application in Chrome/Firefox, then it doesn't matter what keyboard settings I have, the input is still in English. Is there something way to override the input language which I am not seeing? I ask because if I create a new SL project with only