Reputation: 437
I have Persian character in my page. when I display a string contains Persian characters within slash character in the text will not show properly. It should reverse the characters to show properly.
The correct text is:
But when it is displayed as:
361/شماره شد/1397/2
How to solve this problem?
I have tried css direction
and text-align
but they didn't work.
Upvotes: 6
Views: 525
Reputation: 81
@Amir Amiri i tried the unicode-bidi: bidi-override; inspired by @Mr Lister's answer. please run this code snippet to see if this solves your issue
<div style="unicode-bidi: bidi-override;">361/شماره شد/1397/2</div>
Upvotes: 0
Reputation: 46589
Can you change your HTML? The only way I can make it work is by putting the Persian bit in a span and use unicode-bidi: embed
on it.
.e {unicode-bidi: embed;}
361/<span class="e">شماره شد</span>/1397/2
Hope this helps!
Upvotes: 2
Reputation: 81
Please try CSS property direction for your textfield
direction: rtl;
<div style="display:inline-block;direction:rtl">1397/2/شماره شد/361</div>
Upvotes: 0