Re: umlauts

2009-10-17 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: Arian Kuschki schrieb: Whoa, that was quick! Thanks for all the answers, I'll try to recapitulate What does this show you in your interactive interpreter? print "\xc3\xb6" ö For me, it's o-umlaut, ö. This is because the above bytes are the sequence for ö in utf-8

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
Arian Kuschki schrieb: Whoa, that was quick! Thanks for all the answers, I'll try to recapitulate What does this show you in your interactive interpreter? print "\xc3\xb6" ö For me, it's o-umlaut, ö. This is because the above bytes are the sequence for ö in utf-8. If this shows something e

Re: umlauts

2009-10-17 Thread Neil Hodgson
The server is sniffing the User-Agent header to decide whether to send UTF-8 or ISO-8859-1. Try this code: import urllib2 r = urllib2.Request("http://www.google.de/ig/api?weather=Muenchen";, None, {"User-Agent":"Mozilla/5.0"}) f = urllib2.urlopen(r) i = f.info() print(i) xml = f.read()

Re: umlauts

2009-10-17 Thread Arian Kuschki
Hm yes, that is true. In Firefox on the other hand, the response header is "Content-Type text/xml; charset=UTF-8" On Sat 17, 13:16 -0700, Mark Tolonen wrote: > > "Diez B. Roggisch" wrote in message > news:7jub5rf37div...@mid.uni-berlin.de... > [snip] > >This is wierd. I looked at the site in Fi

Re: umlauts

2009-10-17 Thread Mark Tolonen
"Diez B. Roggisch" wrote in message news:7jub5rf37div...@mid.uni-berlin.de... [snip] This is wierd. I looked at the site in FireFox - and it was displayed correctly, including umlauts. Bringing up the info-dialog claims the page is UTF-8, the XML itself says so as well (implicit, through the

Re: umlauts

2009-10-17 Thread I V
On Sat, 17 Oct 2009 21:24:59 +0330, Arian Kuschki wrote: > I just checked and I see the following in the headers: Content-Type > text/xml; charset=UTF-8 > > Where does it say ISO-8859-1? In the headers returned via urllib (and via wget). But checking in Firefox, it does indeed specify UTF-8 in t

Re: umlauts

2009-10-17 Thread Arian Kuschki
I just checked and I see the following in the headers: Content-Type text/xml; charset=UTF-8 Where does it say ISO-8859-1? On Sat 17, 20:57 +0200, I V wrote: > On Sat, 17 Oct 2009 18:54:10 +0200, Diez B. Roggisch wrote: > > > This is wierd. I looked at the site in FireFox - and it was displayed

Re: umlauts

2009-10-17 Thread Arian Kuschki
Whoa, that was quick! Thanks for all the answers, I'll try to recapitulate >What does this show you in your interactive interpreter? > print "\xc3\xb6" >ö > >For me, it's o-umlaut, ö. This is because the above bytes are the >sequence for ö in utf-8. > >If this shows something else, you need t

Re: umlauts

2009-10-17 Thread I V
On Sat, 17 Oct 2009 18:54:10 +0200, Diez B. Roggisch wrote: > This is wierd. I looked at the site in FireFox - and it was displayed > correctly, including umlauts. Bringing up the info-dialog claims the > page is UTF-8, the XML itself says so as well (implicit, through the > missing declaration of

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
StarWing schrieb: On 10月18日, 上午12时50分, "Diez B. Roggisch" wrote: StarWing schrieb: On 10月17日, 下午9时54分, Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains u

Re: umlauts

2009-10-17 Thread StarWing
On 10月18日, 上午12时50分, "Diez B. Roggisch" wrote: > StarWing schrieb: > > > > > On 10月17日, 下午9时54分, Arian Kuschki > > wrote: > >> Hi all > > >> this has been bugging me for a long time and I do not seem to be able to > >> understand what to do. I always have problems when dealing input text that > >

Re: umlauts

2009-10-17 Thread StarWing
On 10月18日, 上午12时14分, MRAB wrote: > Arian Kuschki wrote: > > Hi all > > > this has been bugging me for a long time and I do not seem to be able to > > understand what to do. I always have problems when dealing input text that > > contains umlauts. Consider the following: > > > In [1]: import urllib

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
MRAB schrieb: Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = urllib.urlopen("http://

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
MRAB schrieb: Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = urllib.urlopen("http://

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
StarWing schrieb: On 10月17日, 下午9时54分, Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = ur

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
StarWing schrieb: On 10月17日, 下午9时54分, Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = ur

Re: umlauts

2009-10-17 Thread StarWing
On 10月17日, 下午9时54分, Arian Kuschki wrote: > Hi all > > this has been bugging me for a long time and I do not seem to be able to > understand what to do. I always have problems when dealing input text that > contains umlauts. Consider the following: > > In [1]: import urllib > > In [2]: f = urllib.u

Re: umlauts

2009-10-17 Thread MRAB
Arian Kuschki wrote: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = urllib.urlopen("http://www.google.de/ig

Re: umlauts

2009-10-17 Thread Diez B. Roggisch
Arian Kuschki schrieb: Hi all this has been bugging me for a long time and I do not seem to be able to understand what to do. I always have problems when dealing input text that contains umlauts. Consider the following: In [1]: import urllib In [2]: f = urllib.urlopen("http://www.google.de/

Re: Umlauts in idle

2008-12-13 Thread Marc 'BlackJack' Rintsch
On Sat, 13 Dec 2008 02:58:48 -0800, a_olme wrote: > On 13 Dec, 10:38, "Martin v. Löwis" wrote: >> > When I try to use umlauts in idle it will only print out as Unicode >> > escape characters. Is it possible to configure idle to print them as >> > ordinary characters? >> >> Did you really use the

Re: Umlauts in idle

2008-12-13 Thread a_olme
On 13 Dec, 10:38, "Martin v. Löwis" wrote: > > When I try to use umlauts in idle it will only print out as Unicode > > escape characters. Is it possible to configure idle to print them as > > ordinary characters? > > Did you really use the print statement? They print out fine for me. > > Regards,

Re: Umlauts in idle

2008-12-13 Thread Martin v. Löwis
> When I try to use umlauts in idle it will only print out as Unicode > escape characters. Is it possible to configure idle to print them as > ordinary characters? Did you really use the print statement? They print out fine for me. Regards, Martin -- http://mail.python.org/mailman/listinfo/python

Re: Umlauts in idle

2008-12-12 Thread Benjamin Kaplan
On Fri, Dec 12, 2008 at 3:51 PM, a_olme wrote: > Hello all, > > When I try to use umlauts in idle it will only print out as Unicode > escape characters. Is it possible to configure idle to print them as > ordinary characters? > Best Regards Anders Olme Make sure you are using Unicode strings