Fredrik Lundh wrote:
> character references refer to code points in the Unicode code
> space, so you just convert the bytes you get after converting
> to UTF-8.
"so you cannot just", of course.
--
http://mail.python.org/mailman/listinfo/python-list
Richard Lewis wrote:
> On Mon, 20 Jun 2005 14:27:17 +0200, "Fredrik Lundh"
> <[EMAIL PROTECTED]> said:
> >
> > well, you're messing it up all by yourself. getting rid of all the
> > codecs and
> > unicode2charrefs nonsense will fix this:
> >
> Thanks for being so patient and understanding.
>
> OK
Richard Lewis wrote:
> My code now works without generating any errors but Konqueror's KHTML
> and Embedded Advanced Text Viewer and IE5 on the Mac still show
> capital-A-with-a-tilde in all the files that have been
> generated/altered. Whereas my text editor and Mozilla show them
> correctly.
How
On Mon, 20 Jun 2005 14:27:17 +0200, "Fredrik Lundh"
<[EMAIL PROTECTED]> said:
>
> well, you're messing it up all by yourself. getting rid of all the
> codecs and
> unicode2charrefs nonsense will fix this:
>
Thanks for being so patient and understanding.
OK, I've taken it all out. The only think
Richard Lewis wrote:
> OK, I'm still not getting this unicode business.
obviously.
>
> aàáâã
> eèéêë
> iìíîï
> oòóôõ
> oùúûü
>
>
> (If testing, make sure you save this as utf-8 encoded.)
why? that XML snippet doesn't include any UTF-8-encoded characters.
:::
>file =
On Mon, 20 Jun 2005 12:37:42 +0100, "Richard Lewis"
<[EMAIL PROTECTED]> said:
> [SNIP]
Just add to this: my input document was written using character
references rather than literal characters (as was the sample output
document). However, I've just noticed that my mail client (or maybe
something
OK, I'm still not getting this unicode business.
Given this document:
==
aàáâã
eèéêë
iìíîï
oòóôõ
oùúûü
==
(If testing, make sure you save this as utf-8 encoded.)
and this Python script:
==
import sys
f
Richard Lewis wrote:
> OK, I've fiddled around a bit more but I still haven't managed to get it
> to work. I get the fact that its not the FTP operation thats causing the
> problem so it must be either the xml.minidom.parse() function (and
> whatever sort of file I give that) or the way that I wri
"Richard Lewis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> On Thu, 16 Jun 2005 12:06:50 -0600, "John Roth"
> <[EMAIL PROTECTED]> said:
>> "Richard Lewis" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > Hi there,
>> >
>> > I'm having a problem with unicode f
On Thu, 16 Jun 2005 12:06:50 -0600, "John Roth"
<[EMAIL PROTECTED]> said:
> "Richard Lewis" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi there,
> >
> > I'm having a problem with unicode files and ftplib (using Python 2.3.5).
> >
> > I've got this code:
> >
> > xml_source =
Richard Lewis wrote:
> Hi there,
>
> I'm having a problem with unicode files and ftplib (using Python 2.3.5).
>
> I've got this code:
>
> xml_source = codecs.open("foo.xml", 'w+b', "utf8")
> #xml_source = file("foo.xml", 'w+b')
>
> ftp.retrbinary("RETR foo.xml", xml_source.write)
> #ftp.retrlin
"Richard Lewis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
>
> I'm having a problem with unicode files and ftplib (using Python 2.3.5).
>
> I've got this code:
>
> xml_source = codecs.open("foo.xml", 'w+b', "utf8")
> #xml_source = file("foo.xml", 'w+b')
>
> ftp.retrbin
Hi there,
I'm having a problem with unicode files and ftplib (using Python 2.3.5).
I've got this code:
xml_source = codecs.open("foo.xml", 'w+b', "utf8")
#xml_source = file("foo.xml", 'w+b')
ftp.retrbinary("RETR foo.xml", xml_source.write)
#ftp.retrlines("RETR foo.xml", xml_source.write)
It op
13 matches
Mail list logo