--- OSAS/OSA_system/OSAS_add.py 2004/07/23 17:50:35 1.34 +++ OSAS/OSA_system/OSAS_add.py 2004/08/19 19:01:17 1.35 @@ -188,14 +188,14 @@ def add6(self): newtemplate=PageTemplateFile('Products/OSA_system/zpt/index_meta').__of__(self) newtemplate.content_type="text/plain" - renderxml = newtemplate() + renderxml = newtemplate(encode='utf-8') if self.REQUEST.SESSION.has_key('no_upload'): metapath=self.REQUEST.SESSION['path']+"/index.meta" else: metapath=self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']+"/index.meta" f=open(metapath,'w') - f.writelines(renderxml) + f.write(renderxml) f.close() os.chmod(metapath,0664) os.popen('chmod -R 0775 %s'%self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']) @@ -258,13 +258,17 @@ def addPresentation(self,path): i+=1 self.REQUEST.SESSION['presentationname']="%02d-presentation"%i self.REQUEST.SESSION['path']=path - self.REQUEST.SESSION['xmlvorschlag']=""" + + tmpTxt=""" + %s %s %s yes """%(author,title,date) + self.REQUEST.SESSION['xmlvorschlag']=tmpTxt.encode('utf-8') + newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPresentation').__of__(self) return newtemplate() @@ -410,7 +414,7 @@ def addTextExternal(self,path,texturl,ve node.appendChild(subnode) writefile=file(path+"/index.meta","w") - writefile.write(dom.toxml().encode('utf-8')) + writefile.write(dom.toxml(encoding="UTF-8")) writefile.close() #change texttool tag @@ -439,7 +443,7 @@ def addTextExternal(self,path,texturl,ve #index.meta ausgeben writefile=file(path+"/index.meta","w") - writefile.write(dom.toxml().encode('utf-8')) + writefile.write(dom.toxml(encoding="UTF-8")) writefile.close() #registrieren @@ -512,7 +516,7 @@ def addDirsToIndexMeta(path,folder_name, node.appendChild(subnode) writefile=file(path+"/index.meta","w") - writefile.write(dom.toxml().encode('utf-8')) + writefile.write(dom.toxml(encoding='UTF-8')) writefile.close() def readArchimedesXML(folder): @@ -671,7 +675,7 @@ def combineTextImage2(self,path): """nothing""" writefile=file(path+"/index.meta","w") - writefile.write(dom.toxml().encode('utf-8')) + writefile.write(dom.toxml(encoding="UTF-8")) writefile.close()