天天看點

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不行