谷歌地图api v3自动填充奇怪的字符结果 [英] Google Maps api v3 autocomplete weird characters in result

查看:121
本文介绍了谷歌地图api v3自动填充奇怪的字符结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自动完成功能会为结果中的某些地址返回未知字符,此问题描述为此处为好吧,但没有任何答案。我正在调查这个,很不幸没有找到任何工作的例子。要重现,请转至 https://developers.google.com/ maps / documentation / javascript / examples / places-autocomplete 并输入例如Dobra trefa,你应该得到这个Dobrátrefa,Koněvova,ジシュコフ,Prague-Prague 3,Czech Republic - 即一些日文/中文符号(不确定)。我在Google地图上尝试了相同的名称,它的工作原理非常完美,但它看起来像Google地图仍在使用api v2,所以这并没有什么帮助。我真的坚持这一点,尝试了以下内容:

1。)在脚本标记中添加charset =UTF-8添加到< head> < meta content =text / html; charset = UTF-8http-equiv =content-type>以强制页面编码; 3)将language = en添加到Google Maps API的JavaScript URI中; 4)检查当我输入自动完成时要发送给服务器的内容; 5)检查谷歌地图的工作方式

6.)用Google搜索类似的问题7.)寻找工作解决方案



没有任何结果。



我做错了什么?它可以连接到机器/浏览器/配置?



不要在这里发布我的代码,因为它只是Google官方开发站点的自动完成示例的副本。

转载。我认为这是一个错误,您应该在问题跟踪器中报告: http://code.google.com/p/gmaps-api-issues/issues/list?can=2&q=autocomplete (确保没有任何现有问题与之相关对此:如果你找到一个,明星而不是添加另一个)。



其他答案指出,奇怪的字符是日语。您可能想在这里(和任何相关的地址)在您的错误报告中引用这两个问题。


Autocomplete returns unknown characters for some addresses in results, this problem described here as well, but without any answer. I was investigating this and unfortunately haven't found any working example. To reproduce, go to the https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete and enter for example "Dobra trefa", you'll should get this "Dobrá trefa, Koněvova, ジシュコフ, Prague-Prague 3, Czech Republic" - i.e. some japanese/chinese symbols (not sure). I've tried the same name on Google Maps and it works just perfect, but it looks like Google Maps are still using api v2 so that doesn't really help. I'm really stuck with this, have tried the following:

1.) adding charset="UTF-8" to the script tag
2.) adding into the <head> <meta content="text/html;charset=UTF-8" http-equiv="content-type"> to enforce page encoding
3.) adding language=en to the javascript URI for Google Maps API
4.) checking what is being sent to the server when I type into autocomplete
5.) checking how Google Maps work
6.) googling for the similar questions
7.) looking for working solutions

without any result.

What am I doing wrong? Could it be connected with machine/browser/configuration?

P.S. Not posting my code here, because it's just the copy of example for autocomplete from Google official dev site.

解决方案

Reproduced. I reckon this is a bug, which you should report in the Issues tracker: http://code.google.com/p/gmaps-api-issues/issues/list?can=2&q=autocomplete (do check that none of the existing Issues relate to this: if you find one, star it rather than add another).

As the other answer notes, the odd characters are Japanese. You might want to reference both questions here (and any relevant addresses) in your bug report.

这篇关于谷歌地图api v3自动填充奇怪的字符结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆