How does text in right-to-left languages work when writing HTML code?

233 views Asked by At

I am editing an HTML site that includes several paragraphs in Arabic, and something strange is happening when I delete or replace existing words. If I place a cursor in the middle of a paragraph and press backspace to delete a word letter-by-letter, sometimes the cursor moves left and deletes letters to the left of the cursor (as should be expected with a right-to-left language), but after the first word is deleted, the cursor starts moving right and deletes the word on the right. Other times it happens vice versa--right first, then left.

I don't speak Arabic (using Google translate to replace outdated text), but I am still puzzled by this behavior.

Additionally, if I select a single word and paste another word into the selection, the entire line moves, and it's obvious than more than the word I selected has been replaced. I can verify that something is wrong because when I copy the resulting text into Google Translate, it stops making grammatical sense.

Are there special rules I need to follow when editing right-to-left text in HTML files? I am using Notepad++.

0

There are 0 answers