Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem in rendering Hebrew text in UIWebview

I have some hebrew text stored in database. When I fetch & render it in UIWebview after applying some css (setting the background color and margin for the page) the text comes up fine but the problem is that If I right align the content in webview then the Hebrew content gets right aligned but actually it is not the way it is supposed to be. I mean the way RTL text should have shown. The Full stop appears on the right hand side of the text as shown in image below. I know that right aligning the text will not show it the way RTL text should be

Its not a duplicate and I have gone through the steps mentioned there but still no go.

enter image description here

I hope if someone can help me to shown the text in correct way . I can add the CSS snippet if required. Please comment if any supporting code or image is required

like image 900
Rahul Sharma Avatar asked Jun 01 '26 13:06

Rahul Sharma


1 Answers

You should either set direction: rtl in the CSS or add a dir="rtl" attribute in the HTML.

You may also need to fiddle with the unicode-bidi CSS attribute as well if you're embedding this text into a mixed-language paragraph.

like image 70
Ken Bloom Avatar answered Jun 03 '26 02:06

Ken Bloom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!