Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse String before and after Slash ("/") character

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:

enter image description here

But when it is displayed as:

enter image description here

361/شماره شد/1397/2 

How to solve this problem? I have tried css direction and text-align but they didn't work.

like image 550
Amir Amiri Avatar asked Feb 24 '19 08:02

Amir Amiri


1 Answers

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!

like image 169
Mr Lister Avatar answered Nov 15 '22 00:11

Mr Lister