编码不是拉丁字符google地图标记信息 [英] encoding not latin characters google map marker information

查看:162
本文介绍了编码不是拉丁字符google地图标记信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google地图API添加标记并向其中添加信息,但问题是显示的阿拉伯字符像奇怪的符号,虽然页面编码是utf-8

I'm using Google map API to add markers and add information to them but the problem is with the Arabic characters it's displayed like strange symbols though page encoding is utf-8

>

var locations = [
  ['<div class="content" style="dir:rtl; text-align:right;">'+
  '<div id="siteNotice">'+
  '</div>'+
  '<h1 id="firstHeading" class="firstHeading"><?= "المنزل الأول" ?></h1>'+
  '<div id="bodyContent">'+
  '<p>العنوان بالتفصيل, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  '(last visited June 22, 2009).</p>'+
  '</div>'+
  '</div>', -33.890542, 151.274856, 4],
  ['<div class="content" style="dir:rtl; text-align:right;">'+
  '<div id="siteNotice">'+
  '</div>'+
  '<h1 id="firstHeading" class="firstHeading">المنزل الثاني</h1>'+
  '<div id="bodyContent">'+
  '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  '(last visited June 22, 2009).</p>'+
  '</div>'+
  '</div>', -33.923036, 151.259052, 5]
];


推荐答案

问题是notepad ++ encoding从ANSI改为UTF -8,一切都很好。

The problem was with notepad++ encoding changed from ANSI to UTF-8 and every thing worked fine

这篇关于编码不是拉丁字符google地图标记信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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