farsi

how to turn a Persian (Farsi) paragraph into its list of words in Javascript

别等时光非礼了梦想. 提交于 2019-12-13 07:57:26
问题 I am trying to make an object out of a paragraph that shows words with their frequencies. var pattern = /\w+/g, //the farsi paragraph string = "من امروز در مورد مهر خروج مشمولین اطلاعات جدیدی از سفارت ایران در مالزی گرفتم", matchedWords = string.match( pattern ); /* The Array.prototype.reduce method assists us in producing a single value from an array. In this case, we're going to use it to output an object with results. */ var counts = matchedWords.reduce(function ( stats, word ) { /* `stats

Is there any way to change the order and type of numbers in table of contents of restructured texts?

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:39:20
问题 Using restructured texts is an easy way for writing formatted texts. But there are some problems regarding to left to right languages. I appreciate any helpful comment to solve these problems or at least some helpful guidance. I usually use rst2html to convert rst files to htmls. 1- "section-numbering" always produces left to right numbering while in right to left languages like Farsi, Arabic, Urdu, and Hebrew the order of numbers must be reversed. The digits of numbers have the same position

How can i write farsi (persian) in android?

我的梦境 提交于 2019-12-11 05:46:13
问题 I'm new in android. I used PersianReshape to change textview,button and ... so they are worked But i want to write persian for example in a toast or option menu and i dont know how ? this is partial of my cod that worked for button and text view Button b = (Button) findViewById(R.id.button1); TextView tv =(TextView) findViewById(R.id.textView1); PersianReshape.ReshapeButton(b, "Tannaz.ttf", MainActivity.this); PersianReshape.ReshapeTextview(tv, "Tannaz.ttf", MainActivity.this); 回答1: Android 2

can't search in farsi text with arabic keyboard on iphone

心已入冬 提交于 2019-12-10 23:07:53
问题 I have recently developed a book for iphone and implemented search function in this app. but after testing the app on a real iphone I wondered it cant find all of the search Terms. (using farsi keyboard on my mac) for example it cant find words containing "ی" character because the search terms contains "ي" character which is inserted from iphone arabic keyboard!! my texts are a lot and I cant find all of theses similar characters!! Is there any way to convert my farsi text to arabic text? 回答1

how can I detect farsi web pages by tika?

微笑、不失礼 提交于 2019-12-09 06:59:23
问题 I need a sample code to help me detect farsi language web pages by apache tika toolkit. LanguageIdentifier identifier = new LanguageIdentifier("فارسی"); String language = identifier.getLanguage(); I have download apache.tika jar files and add them to the classpath. but this code gives error for Farsi language but it works for english. how can I add Farsi to languageIdentifier package of tika? 回答1: Tika doesn't ship with a language profile for the Farsi language yet. As of version 1.0 27

auto change keyboard language using javascript not work without IE

霸气de小男生 提交于 2019-12-08 08:52:11
问题 i have a Java Script Code that can change Keyboard Language when focus on text box. but this code just work in IE and cant work correctly in Firefox or Opera my code : <script type="text/javascript" language="javascript"> var farsi = true ; var s = new Array(32,33,34,35,36,37,1548,1711,41,40,215,43, 1608,45,46,47,48,49,50,51,52,53,54,55,56, 57,58,1603,44,61,46,1567,64,1616,1584,125, 1609,1615,1609,1604,1570,247,1600,1548,47, 8217,1583,215,1563,1614,1569,1613,1601, 8216,123,1611,1618,1573,126

Persian @font-face doesn't work in Chrome, Bug or not?

淺唱寂寞╮ 提交于 2019-12-07 04:18:57
问题 Not sure if I'm heading a bug in Chrome or something is wrong with my CSS Here is a demonstration of what I'm talking about: demo link The problem is that I'm using a custom Farsi font in my website named as BMitra ( it is absolutely free in public domain ) and all major browsers (latest FF and IE6+) are rendering this font just fine but my Chrome skips this font and switches to system's default tahoma . Here is my CSS: @font-face { font-family: 'BMitra'; font-weight: normal; src: url('fonts

Why 'ARABIC LETTER PEH' is not shown correctly on Android 3.x?

こ雲淡風輕ζ 提交于 2019-12-06 05:38:21
问题 In Unicode characters the ARABIC LETTER PEH INITIAL FORM 'ﭘ' is 0xFB58 . When I use the following code to show Unicode characters, everything is OK for every Unicode character in Android 2.2, 2.3. and 4.x But I have problem with ARABIC LETTER PEH 'ﭘ' on Android 3.x and in this case character '~' is shown. Typeface tf = Typeface.createFromAsset(context.getAssets(),"TAHOMA.TTF"); strChars = ""; strChars += (char) 0xFB58; tvChars.setTypeface(tf); tvChars.setText(strChars); I should mention that

Why 'ARABIC LETTER PEH' is not shown correctly on Android 3.x?

╄→尐↘猪︶ㄣ 提交于 2019-12-04 11:48:45
In Unicode characters the ARABIC LETTER PEH INITIAL FORM 'ﭘ' is 0xFB58 . When I use the following code to show Unicode characters, everything is OK for every Unicode character in Android 2.2, 2.3. and 4.x But I have problem with ARABIC LETTER PEH 'ﭘ' on Android 3.x and in this case character '~' is shown. Typeface tf = Typeface.createFromAsset(context.getAssets(),"TAHOMA.TTF"); strChars = ""; strChars += (char) 0xFB58; tvChars.setTypeface(tf); tvChars.setText(strChars); I should mention that The problem is remained when I change the font or ignore using setTypeface(tf) Why? How can I find the

How to write unicode character farsi in C++ in ms-dos console?

谁说我不能喝 提交于 2019-12-04 11:42:56
问题 How to write unicode character farsi in c++ in ms-dos? cout<<"Helo world"<<"سلام جهان"; 回答1: #include <iostream> #include <locale> #include <string> int main() { using namespace std; wstring wcs = L"中文"; locale old = wcout.imbue(locale("") ); // "" is environment's default locale wcout<<wcs<<endl; wcout.imbue(old ); // restore old locale } 回答2: You need to convert the string to proper codepage. MS-DOS codepages are named like CP437, with CP followed by three digits. Notice that normally only