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
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
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()
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
"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
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
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
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
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
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
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
> >
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
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://
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://
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
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
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
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
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/
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
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,
> 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
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
23 matches
Mail list logo