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

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

修改Styles下的你的style:

Xml代码  
<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”>  
<?xml version="1.0" encoding="<span style="background-color: rgb(255, 0, 0);">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不行

转载自:https://blog.csdn.net/software444/article/details/50088329

You may also like...

退出移动版