ez projects / ezvim / forum / general / error
You need to be logged in to post messages in the forums. New users may register here.
|
Member since: Posts: 12 |
Thursday 12 March 2009 9:15:22 am Hi,
I just tried your extension. When i want to load the classes this error occurs: Fehler beim Ausführen von "function Ezcv": Zeile 52: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/punknroll/.vim/plugin/ez.py", line 53, in eZClassesView attr_txt = eZAttributeClass(attr) File "/home/punknroll/.vim/plugin/ez.py", line 94, in eZAttributeClass attr_txt = attr_txt+str(attr_name)+' #'+str(attr_numeric_id) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 18: ordinal not in range(128) ---------------------------------------- any idea? thanx in advance --------------------------------------- |
|
|
Member since: Posts: 12 |
Friday 13 March 2009 4:16:13 pm There is a bug if you have non-Ascii caracters. I made a patch for it. This is needed if you have for example german Umlauts.
--- ez.py.old 2009-03-12 13:14:24.000000000 +0100 +++ ez.py 2009-03-13 15:54:35.000000000 +0100 @@ -76,7 +76,7 @@ def eZClassText(cl): class_name = cl.getAttribute('name') class_identifier = cl.getAttribute('identifier') class_numeric_id = cl.getAttribute('id') - class_txt = str(class_name) +' #'+str(class_numeric_id) + class_txt = str(class_name.encode('utf-8')) +' #'+str(class_numeric_id) class_txt = class_txt+' ['+str(class_identifier)+']' return class_txt @@ -91,7 +91,7 @@ def eZAttributeClass(attr): if attr_required : attr_prefix = '+' attr_txt = ' '+attr_prefix+' '+str(attr_id)+' ' - attr_txt = attr_txt+str(attr_name)+' #'+str(attr_numeric_id) + attr_txt = attr_txt+str(attr_name.encode('utf-8'))+' #'+str(attr_numeric_id) attr_txt = attr_txt+' ['+str(attr_type)+']' return attr_txt --------------------------------------- |
You need to be logged in to post messages in the forums. New users may register here.