bad data from urllib when run from MS .bat file
smcg4191 at frii.RimoovThisToReply.com
Mon Sep 20 15:33:13 CEST 2004
"Bengt Richter" <bokr at oz.net> wrote in message news:cilp2b$l3k$0$220.127.116.11 at theriver.com...
> On Sat, 18 Sep 2004 16:23:40 -0600, "Stuart McGraw" <smcg4191 at frii.RimoovThisToReply.com> wrote:
> >I just spent a $*#@!*&^&% hour registering at ^$#@#%^
> >Sourceforce and trying to submit a Python bug report
> >but it still won't let me. I give up. Maybe someone who
> >cares will see this post, or maybe it will save time for
> >someone else who runs into this problem...
> >- Microsoft Windows 2000 Pro
> >- Python 2.3.4
> >- urllib (version shipped with Python-2.3.4)
> > urllib returns corrupted data when reading an EUC-JP encoded
> > web page, from a python script run from a MS Windows .BAT
> >file, but not when the same script is run from the command line.
> Just a thought: in case your command line is being interpreted
> by cmd.exe and .bat by something else (command.com?) you could
> check if it makes a difference, e.g.,
> copy test.bat test.cmd
> and try it again? (explicitly as test.cmd, not just test, since any
> same-name .com or .exe or .bat may have priority over .cmd)
> You can probably investigate the latter by something like
> [21:54] C:\pywk\junk>echo %pathext%
Well, I'm pretty sure cmd.exe was executing it, but I tried your
suggestion to make absolutely sure. Same results :-(
Given the other (seeming) urllib problem I mentioned in another
post in this thread, which appeared without any involvement
of batch scripts, I am getting more and more suspicious that
urllib is buggy, at least with non-single byte data.
More information about the Python-list