Re: [Tutor] UTF-8 by default

2005-05-29 Thread Kent Johnson
Jonas Melian wrote: > Kent Johnson wrote: > >>>How write by default in UTF-8 instead of ASCII? >> >> >>How are you writing the file? What encoding is your data originally? >> > > > For writing the XML file: > >>>ElementTree.ElementTree(root).write("file.xml") The elementTree.write() method tak

Re: [Tutor] UTF-8 by default

2005-05-29 Thread Jonas Melian
Kent Johnson wrote: >>How write by default in UTF-8 instead of ASCII? > > > How are you writing the file? What encoding is your data originally? > For writing the XML file: >>ElementTree.ElementTree(root).write("file.xml") The source encoding is UTF-8 ( # -*- coding: utf-8 -*- ) But I also w

Re: [Tutor] UTF-8 by default

2005-05-28 Thread Kent Johnson
Jonas Melian wrote: > Hi all, > > I'm working with an XML file, and i want to write in UTF-8 > How write by default in UTF-8 instead of ASCII? How are you writing the file? What encoding is your data originally? If the data is all in US-ASCII (codes 0-127) then it is already UTF-8 as US-ASCII i

[Tutor] UTF-8 by default

2005-05-28 Thread Jonas Melian
Hi all, I'm working with an XML file, and i want to write in UTF-8 How write by default in UTF-8 instead of ASCII? And I want not to use: print u'String' Thanks in advance! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo