# Bidi / rtl language support in Ruby (Rails)

**URL:** <https://www.ruby-forum.com/t/bidi-rtl-language-support-in-ruby-rails/110878>\
**Category:** Rails\
**Created:** [July 31, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/bidi-rtl-language-support-in-ruby-rails/110878 "2007-07-31T18:45:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/bidi-rtl-language-support-in-ruby-rails/110878/1 "2007-07-31T18:45:12Z")

</div>

As long as you are only doing web things with HTML Ruby and Rails are  
doing well with Arabic / Hebrew languages. As soon as you want to  
export that data into lets say an image or a pdf you need to reorder  
the UTF-8 string with a so called “bidi” algorithm.

Has anyone implemented this in Ruby? Or exists a wrapper for Pretty  
Good Bidi Algorithm [http://crl.nmsu.edu/~mleisher/ucdata.html](http://crl.nmsu.edu/~mleisher/ucdata.html) or  
fribidi ([http://fribidi.freedesktop.org/wiki/](http://fribidi.freedesktop.org/wiki/)) ?

Regards  
Till
