天天看点

GeoServer发布shapfile字段名和值乱码问题解决

网上说了一大堆方法又是转格式咯又是改源代码了,修改很简单:

修改styles下的你的style:

GeoServer发布shapfile字段名和值乱码问题解决

<?xml version="1.0" encoding="<span style="background-color: #ff0000;">gbk</span>"?>  

<styledlayerdescriptor version="1.0.0"   

 xsi:schemalocation="http://www.opengis.net/sld styledlayerdescriptor.xsd"   

 xmlns="http://www.opengis.net/sld"   

 xmlns:ogc="http://www.opengis.net/ogc"   

 xmlns:xlink="http://www.w3.org/1999/xlink"   

 xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">  

 修改stores下你的图层的属性,设置 dbf charset为gbk

以上设置gbk和gb2312均可,utf-8不行