[Tutor] unicode problem

Emad Nawfal emadnawfal at gmail.com
Wed Sep 19 02:23:57 CEST 2007


*Hi All Tutors,*
*I'm new and I'm trying to use unicode strings in my code (specifically
Arabic), but I get this:*

IDLE 1.2.1
>>> text = ur'المصريون'
Unsupported characters in input

>>> for letter in text:
 print letter



Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    for letter in text:
NameError: name 'text' is not defined
>>> u = u'المضريون'
Unsupported characters in input

>>> s = u'المصريون'.encode('utf-8')
Unsupported characters in input
*Can anyone please tell me how to use Arabic in my code?
*
-- 
لا أعرف مظلوما تواطأ الناس علي هضمه ولا زهدوا في إنصافه كالحقيقة.....محمد
الغزالي
Emad Soliman Nawfal
Indiana University, Bloomington
http://emadnawfal.googlepages.com
--------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070918/dbaba6b1/attachment.htm 


More information about the Tutor mailing list