jtasker / python-weather-api

Automatically exported from code.google.com/p/python-weather-api
MIT License
1 stars 1 forks source link

Bad handling of utf-8 (problem with accentuated characters) #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.call: weather = pywapi.get_weather_from_google('Bourget+du+lac')
2.or call for any city that will have an accentuated character in the name
3.

What is the expected output? What do you see instead?
Bad handling of utf-8, or accentuated character

What version of the product are you using? On what operating system?
latest version, ubuntu 10.10

Please provide any additional information below.

Original issue reported on code.google.com by gromain....@gmail.com on 5 Jan 2011 at 11:23

GoogleCodeExporter commented 9 years ago
call: weather = pywapi.get_weather_from_google('Düsseldorf')
doesn't work too.
When using Dusseldorf or Duesseldorf, it gives an error too. Calling Malmo does 
give the result for Malmö in Sweden.

Original comment by t.kloste...@gmail.com on 24 Feb 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Problem with get_weather_from_google() doesn't apply anymore, but this problem 
still exists with get_location_ids().

It seems the place names are stored without the correct accents in Yahoo's 
database so perhaps we can just strip the accents from the user-specified place 
name and submit the query with the un-accented text.

Original comment by jtas...@gmail.com on 21 May 2013 at 8:03

GoogleCodeExporter commented 9 years ago
This has been fixed in 0.3.3. get_location_ids() requires the Unidecode python 
module, because Weather.com's database stores mangled placenames, i.e. with all 
accents stripped

Original comment by jtas...@gmail.com on 2 Jun 2013 at 5:31