I have worked with Django for the past 2 years and constantly used Hebrew text in my applications (whether on the html or the servers-side). I found Django to be fantastic with internationalization and working with unicode (more so than python to be frank).
Just follow these few tips and you'll probably be fine:
To every .py file in your app that contains foreign characters, make sure you add a utf-8 bash at the top of the file:
# encoding=utf-8
When using strings with arabic characters be sure to add a little u before the string. Make sure you keep that in mind at all times. whenever you are using strings:
u'some arabic word' #this will work u'%s' % word #this will work 'some string' + u'some arabic string' #this will fail u'some string' + u'some arabic string' #this will work
When you first create your Database make sure you save it with proper utf-8 (
Database Chartset = utf8
andDatabase Collation = utf8_general_ci
should prove fine).make sure all pages presenting arabic have this meta tag in your html (better to do it inside the head tag in a base.html file and make all the templates inherit it):
<meta charset='utf-8'>
Usually that should be it. Yeah, I know, usually foreign characters are a headache, right? not with Django.