Forum How do I...?

RTL and LTR text isolation

I'm currently using <bdi> tags with the following style:

bdi {
unicode-bidi: embed;

With English text between Farsi and Arabic things seem to get weird especially when there are () or , etc involved. It seems like I've to wrap each word in a <bdi> tag, for example:

<p dir="rtl">مرحبا بالعالم (Hello, my name is, Brandon) مرحبا بالعالم</p>

With long segments of text it does not seem to isolate the english text unless I do <bdi> around very specific parts of "(Hello, my name is, Brandon)" leaving my code riddled with random bdi tags to get the right effect. Theres got to be a better way? Any help is appreciated, thank you!
Can you post a HTML file and the resulting PDF (or a screenshot)? What version of Prince are you using?
Sorry for the delay, will get an example together. Using latest prince version.