<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi All,</div><div><br></div><div><b>Is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030? NOTE: my mapserv is V5.2.1.</b></div><div><b><br></b></div><div><b>[PROBLEM]:</b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>I am now using mapinfo tab files as my map data. </div><div>Labels in the mapinfo files are in Chinese. In order to support styles within mapinfo, I use 'STYLEITEM AUTO'. </div><div>Then style are displayed well, however, Chinese characters are <span id="w_18" high-light-id="" style="color: rgb(102, 102, 102); font-family: arial; line-height: 18px;">not </span><span id="w_19" high-light-id="w_2,w_19" class="" style="color: rgb(102, 102, 102); font-family: arial; line-height: 18px;">displayed </span><span id="w_20" high-light-id="w_4,w_20" class="high-light" style="color: rgb(231, 67, 47); font-family: arial; line-height: 18px;">properly.</span></div></blockquote><div><span high-light-id="w_4,w_20" class="high-light" style="color: rgb(231, 67, 47); font-family: arial; line-height: 18px;"><br></span></div><div><span style="font-family: arial; line-height: 18px; color: rgb(0, 0, 0);"><b>[PROBLEM DESCRIPTION]:</b></span></div><div><ul><li><span style="font-family: arial; line-height: 18px;">Mapserver version: 5.2.1.</span></li></ul></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font face="arial"><span style="line-height: 18px;"><div>MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF</div></span></font></div></div><div><div><font face="arial"><span style="line-height: 18px;"><div> OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICO</div></span></font></div></div><div><div><font face="arial"><span style="line-height: 18px;"><div>NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER</div></span></font></div></div><div><div><font face="arial"><span style="line-height: 18px;"><div>SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP</div></span></font></div></div><div><div><font face="arial"><span style="line-height: 18px;"><div>PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR</div></span></font></div></div><div><div><font face="arial"><span style="line-height: 18px;"><div> INPUT=GDAL INPUT=SHAPEFILE</div></span></font></div></div></blockquote><div><ul><li><span style="line-height: 1.7;">ogrinfo of tab file:</span></li></ul></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>OGRFeature(2000_BJ10):4</div></div><div><div> blank (String) = </div></div><div><div> Style = LABEL(t:"育",a:0.000000,s:1.380000g,c:#000000,p:1,f:"")</div></div><div><div> POINT (1017054046.578231 612967797.60216415)</div></div><div><br></div></blockquote><div><b>[CONFUSING]:</b></div><div><ul><li><span style="line-height: 1.7;">When I use STYLEITEM AUTO, I can't set 'ENCODING GB18030' for LABEL. </span></li><li><span style="line-height: 1.7;">If not using STYLEITEM AUTO, I can't set LABELITEM, because the chinese character is within Style=LABEL(t:"Chinese character"....).</span></li></ul></div><div><span style="line-height: 1.7;"><b>Method I also tried includes:</b></span></div><div><ul><li><span style="line-height: 1.7;">Change mapfile encoding from ANSI to UTF-8</span></li><li><span style="line-height: 1.7;">Change MIF/MID encoding from ANSI to UTF-8, or even to BIG5.</span></li></ul></div><div><span style="line-height: 1.7; font-size: 18px;"><b>So, is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030? NOTE: my mapserv is V5.2.1.</b></span></div><div><span style="line-height: 1.7;"><br></span></div><div><b>[MORE INFORMATION]:</b></div><div>I also have another mapinfo tab file, whose data is like this:<br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>ENAME2000: String (50.0)</div></div><div><div>OGRFeature(省界):1</div></div><div><div> <b>NAME (String) = 北京市</b></div></div><div><div> AREA (Real) = 1.733</div></div><div><div> PERIMETER (Real) = 8.498</div></div><div><div> 省界_ (Real) = 9</div></div><div><div> 省界_ID (Real) = 11</div></div><div><div> CODE2000 (Real) = 110000</div></div><div><div> ENAME2000 (String) = Beijing Municipality</div></div><div><div> Style = BRUSH(fc:#f0f0f0,bc:#ffffff,id:"mapinfo-brush-2.ogr-brush-0");PEN(w:1p</div></div><div><div>x,c:#d0d0d0,id:"mapinfo-pen-2.ogr-pen-0")</div></div></blockquote><div><b>In this situation, I can use one layer with 'STYLEITEM AUTO' to display styles, and another layer with 'LABELITEM NAME' and LABEL ... END to display Labels, without any problem. Mapfile is as follow</b>:</div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>LAYER</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>##DATASOURCETYPE 0</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NAME "test"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TYPE polygon</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS DEFAULT</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>OPACITY 100</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>SIZEUNITS pixels</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>DATA "省界"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>CONNECTIONTYPE ogr</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STYLEITEM "AUTO"</div><div><span class="Apple-tab-span" style="line-height: 1.7; white-space: pre;"> </span><span style="line-height: 1.7;">PROJECTION</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>AUTO</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><span class="Apple-tab-span" style="line-height: 1.7; white-space: pre;"> </span><span style="line-height: 1.7;">CLASS</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NAME "Untitled class"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>LAYER</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>##DATASOURCETYPE 0</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NAME "省界"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TYPE annotation</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>STATUS DEFAULT</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>OPACITY 100</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>SIZEUNITS pixels</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>DATA "省界"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>CONNECTIONTYPE ogr</div><div><span class="Apple-tab-span" style="line-height: 1.7; white-space: pre;"> </span><span style="line-height: 1.7;">PROJECTION</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>AUTO</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>LABELITEM "NAME"</div><div><span class="Apple-tab-span" style="line-height: 1.7; white-space: pre;"> </span><span style="line-height: 1.7;">CLASS</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NAME "Untitled class"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>LABEL</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ANGLE auto</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>FONT "HEITI"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ENCODING "GB18030"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>TYPE truetype</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>PRIORITY 1</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>SIZE 10</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MAXSIZE 256</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MINSIZE 4</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>COLOR 255 0 0</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>OUTLINECOLOR 0 255 255</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>BACKGROUNDSHADOWSIZE 1 1</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>POSITION cc</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ANTIALIAS FALSE</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>FORCE FALSE</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>PARTIALS FALSE</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div><div><span class="Apple-tab-span" style="line-height: 1.7; white-space: pre;"> </span><span style="line-height: 1.7;">END</span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>END</div></div><div><br></div><div><b>As you can see the difference between the two kinds of tab file, </b></div><div><ul><li><span style="line-height: 1.7;">one set chinese character in to LABEL(t:'') field, in which I not know how to both set STYLEITEM AUTO and set ENCODING to LABEL.</span></li><li><span style="line-height: 1.7;">the other set Chinese character to the NAME field, in which I can set one layer with STYLEITEM AUTO, and another layer with LABELITEM.</span></li></ul></div><div><b>Can anyone solve the problem I described in this post?</b></div><div><b>Waiting for your reply.<span style="line-height: 1.7;"> </span><span style="line-height: 1.7;">Thanks very much.</span></b></div><div><br></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><span title="neteasefooter"><span id="netease_mail_footer"><a href="#" target="_blank"></a></span></span>
</span></span></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><span title="neteasefooter"><span id="netease_mail_footer"><a href="#" target="_blank"></a></span></span>
</span></span>