You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Persian /Farsi / Arabic Alphabet - Automatic character change after space

When typing Farsi in a text box or textedit, after each space, there is an algorithm behind the scenes that changes the letter/ character to a variation of that character that sometimes is not what users want. It basically enforces certain rules and I could not find a way to change the behaviour.


For example: "ها" at the end of a Persian noun, changes the noun to plural like "s" in English.

book : کتاب

books: can be written in two forms: "کتابها" or "كتاب ها" without the space between "ب" and "ها". If one attempts to delete the space=" " in "كتاب ها", it changes the word presentation to "کتابها"

In traditional Persian/Farsi keyboards, like English keyboards, pressing SHIFT would give you Capital / other forms of the character. In this smart keyboard, we don't have this option.


I can think of three solutions for that:

  1. Apple introduces a new character/or feature like SHIFT+SPACE which basically tells the algorithm not to insert the space but apply the algorithm like there is a real space and let the user continue typing like there was a space in between.
  2. provide all the variations of each alphabetic letters so that users can select the one they want.
  3. or like accent letters, holding the base letters should give all the variations of the same letter and if a user choses one of the variations, the user should be able to continue without correction from the algorithm. (Note, like English, in Farsi there are B="ب" and b="بـ" and "ـب" "ـبـــ". On the keyboard, "ب" is the only option and the algorithm decides which form to use. )


Please let me know if there is an existing workaround / solution to modify the rules of this algorithm.


Note: I selected macOS but this applies to iOS as well.


Thank you.



MacBook Pro 13", macOS 10.14

Posted on May 28, 2019 8:07 PM

Reply
Question marked as Top-ranking reply

Posted on May 29, 2019 4:19 AM

Re iOS again, doesn't the special key circled in the photo below solve the problem?


Similar questions

8 replies

Jun 1, 2019 4:44 AM in response to farnamf

farnamf wrote:

key H in Persian Qwerty keyboard types "ه". If you press the same key 4 times with one space " ه ههه" , you see all the variations of the same letter. But these letters cannot be typed separately.

To type them separately, you need to use the Zero Width Joiner, ZWJ, U+200d, either after, before and after, or before typing the key. I don't think this is anywhere on the keyboard, you have to use Character Viewer or a text replacement. Below is an example from TextEdit.






May 29, 2019 2:37 AM in response to farnamf

Regarding the space issue, standard practice in Unicode Farsi is to use the character ZWNJ U+200C instead of space:


https://en.wikipedia.org/wiki/Zero-width_non-joiner


Apple's Persian Qwerty keyboard produces this via Shift + space in MacOS (and iOS with a hardware keyboard).


I will have to check the iOS screen keyboard to see where it might be there.


(Whether a particular app will do the right thing has to be tested)


ِRegarding what you produce with the SHIFT level, I don't understand what you are referring to. Could you give some examples of what you want to input which Apple's MacOS keyboard does not provide?



May 31, 2019 7:09 PM in response to Tom Gewecke

Thank you very much for your help. Wikipedia article answered a lot of questions I had. In Mac, I used SHIFT+SPACE to solve some of the issues I had. Is there a key combination in Mac that produces Thin Space "https://en.wikipedia.org/wiki/Thin_space" as well? ZWNJ solved most of my problems but some of the combinations of letters require a thin space in between to look normal.


Also regarding the traditional Persian keyboards, a user could find all the variations of a letter by using some combination of SHIFT/CTRL/ALT+KEY. For example, key H in Persian Qwerty keyboard types "ه". If you press the same key 4 times with one space " ه ههه" , you see all the variations of the same letter. But these letters cannot be typed separately. Even if you put the cursor in between and press SHIFT+SPACE, they will automatically change to the original presentation "ه".


If I use under-score before or after, I can create these variations "ـهـ ـه هـ". This will solve my problem in presenting individual letters in a text but it will look longer. Maybe this is the only way in MAC. In iOS, I couldn't find similar underscore functionality in screen keyboard. I haven't tried bluetooth keyboard.


Thanks again for your help.


Jun 1, 2019 2:55 AM in response to farnamf

farnamf wrote:

Is there a key combination in Mac that produces Thin Space "https://en.wikipedia.org/wiki/Thin_space" as well?


I don't think so, though I have not tried every key on the Persian layout. The unicode thin space is U+2009. You can make it from the Character Viewer (Edit > Emoji and Symbols), but that is cumbersome. You could try making a text replacement for it in system preferences/keyboard/text/replace with. Or a custom keyboard layout using

this app:


https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele


I will get back to you regarding producing the variations of the Arabic script letter forms.

Persian /Farsi / Arabic Alphabet - Automatic character change after space

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.