# HG changeset patch
# User etisserant
# Date 1183037770 -7200
# Node ID b249063406734b684f1519acb569527074537e36
# Parent  c6e9fc22de5c524f3cbb9cd620507c42144b5154
Fixed unicode encoding in gen_cfile.py

diff -r c6e9fc22de5c -r b24906340673 objdictgen/gen_cfile.py
--- a/objdictgen/gen_cfile.py	Wed Jun 27 08:35:22 2007 +0200
+++ b/objdictgen/gen_cfile.py	Thu Jun 28 15:36:10 2007 +0200
@@ -137,12 +137,11 @@
     strDeclareCallback = ""
     indexContents = {}
     indexCallbacks = {}
-    translate_characters = "".join([chr(i) for i in xrange(128)] + ["_" for i in xrange(128)])
     for index in listIndex:
         texts["index"] = index
         strIndex = ""
         entry_infos = Manager.GetEntryInfos(index)
-        texts["EntryName"] = entry_infos["name"].translate(translate_characters)
+        texts["EntryName"] = entry_infos["name"].encode('ascii','replace')
         values = Manager.GetCurrentEntry(index)
         callbacks = Manager.HasCurrentEntryCallbacks(index)
         if index in variablelist: