[Tutor] encode question!

=?GB2312?B?zPrKrw==?= winglion1 at 163.com
Tue Sep 27 08:01:43 CEST 2005

    I am trying to write a stript that extract jpg files
 from a html I had downloaded.I encounter a problem with
 a Big5 charset html file.Big5 used in Hongkong ans Taiwan.
    In this html file there's a jpg names "xvg_h%202.jpg"
in vi ,the tag of the image is <img src="...../xvg_h%25202.jpg>,
and as python read it out, it was "xvg_h%2525202.jpg".
As I try to test the size of this image,python report that 
file "xvg_h%2525202.jpg" don't  exists.
     I think %25 mean the char "%",the "%2525" was equal to 
the "%25" in html and "%" in the shell listed file name.
I had no idea about this encode! Is the html tag use big5 too?
Why '%' should be code as big5, I think it was a ASCII char before
     So, how can I read this file name correctly!

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡winglion1 at 163.com

More information about the Tutor mailing list