<div dir="ltr">Hi,<div><br></div><div>I am using MapServer 6.4.1 and I also encountered the problem with encoding while using STYLEITEM AUTO.</div><div><br></div><div>There is my mapfile and DGN file in an attachment. This mapfile works well, because I defined LABEL there (I can! what an advantage compared to Chinese...), but when I leave CLASS empty and set STYLEITEM AUTO, special characters are not displaying. In this small case I can use LABEL encoding and I can display data correctly, but if I have different DGN file with many labels in it and in many styles, it is really unpleasant to style them all just because of encoding...</div><div><br></div><div>I would really appreciate if there is possibility to define encoding in STYLEITEM AUTO mode.</div><div><br></div><div>Thank you,</div><div>Eva Jelinkova</div><div><br></div><div>P.S.: EPSG:5514 is: </div><div><5514> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=greenwich +units=m +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +no_defs <><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-13 8:54 GMT+02:00 Rahkonen Jukka (Tike) <span dir="ltr"><<a href="mailto:jukka.rahkonen@mmmtike.fi" target="_blank">jukka.rahkonen@mmmtike.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
It seems that you have done a good work by studying the situation yourself and it looks like combination “styleitem auto” and “encoding GB18030” does not work in your environment. However, it is unlikely that you will get any better answer that this one I am writing because you are using version 5.2.1 which was released 2008-12-08. There can’t be many users worldwide who are using that old version, Chinase character set, and data from MapInfo TAB.<br>
<br>
I suggest you to update to version 6.5-dev or at least 6.4.1 and repeat your test. If it still fails, prepare a test package with a small sample of MapInfo data and a minimal but complete mapfile so other users and developers can reproduce the issue.<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
TENGDA wrote:<br>
<br>
Hi All,<br>
<br>
Is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030? NOTE: my mapserv is V5.2.1.<br>
<br>
[PROBLEM]:<br>
I am now using mapinfo tab files as my map data. <br>
Labels in the mapinfo files are in Chinese. In order to support styles within mapinfo, I use 'STYLEITEM AUTO'. <br>
Then style are displayed well, however, Chinese characters are not displayed properly.<br>
<br>
[PROBLEM DESCRIPTION]:<br>
• Mapserver version: 5.2.1.<br>
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF<br>
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICO<br>
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER<br>
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP<br>
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR<br>
INPUT=GDAL INPUT=SHAPEFILE<br>
• ogrinfo of tab file:<br>
OGRFeature(2000_BJ10):4<br>
blank (String) = <br>
Style = LABEL(t:"育",a:0.000000,s:1.380000g,c:#000000,p:1,f:"")<br>
POINT (1017054046.578231 612967797.60216415)<br>
<br>
[CONFUSING]:<br>
• When I use STYLEITEM AUTO, I can't set 'ENCODING GB18030' for LABEL. <br>
• If not using STYLEITEM AUTO, I can't set LABELITEM, because the chinese character is within Style=LABEL(t:"Chinese character"....).<br>
Method I also tried includes:<br>
• Change mapfile encoding from ANSI to UTF-8<br>
• Change MIF/MID encoding from ANSI to UTF-8, or even to BIG5.<br>
So, is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030? NOTE: my mapserv is V5.2.1.<br>
<br>
[MORE INFORMATION]:<br>
I also have another mapinfo tab file, whose data is like this:<br>
ENAME2000: String (50.0)<br>
OGRFeature(省界):1<br>
NAME (String) = 北京市<br>
AREA (Real) = 1.733<br>
PERIMETER (Real) = 8.498<br>
省界_ (Real) = 9<br>
省界_ID (Real) = 11<br>
CODE2000 (Real) = 110000<br>
ENAME2000 (String) = Beijing Municipality<br>
Style = BRUSH(fc:#f0f0f0,bc:#ffffff,id:"mapinfo-brush-2.ogr-brush-0");PEN(w:1p<br>
x,c:#d0d0d0,id:"mapinfo-pen-2.ogr-pen-0")<br>
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:<br>
LAYER<br>
##DATASOURCETYPE 0<br>
NAME "test"<br>
TYPE polygon<br>
STATUS DEFAULT<br>
OPACITY 100<br>
SIZEUNITS pixels<br>
DATA "省界"<br>
CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"<br>
CONNECTIONTYPE ogr<br>
STYLEITEM "AUTO"<br>
PROJECTION<br>
AUTO<br>
END<br>
CLASS<br>
NAME "Untitled class"<br>
END<br>
END<br>
LAYER<br>
##DATASOURCETYPE 0<br>
NAME "省界"<br>
TYPE annotation<br>
STATUS DEFAULT<br>
OPACITY 100<br>
SIZEUNITS pixels<br>
DATA "省界"<br>
CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"<br>
CONNECTIONTYPE ogr<br>
PROJECTION<br>
AUTO<br>
END<br>
LABELITEM "NAME"<br>
CLASS<br>
NAME "Untitled class"<br>
LABEL<br>
ANGLE auto<br>
FONT "HEITI"<br>
ENCODING "GB18030"<br>
TYPE truetype<br>
PRIORITY 1<br>
SIZE 10<br>
MAXSIZE 256<br>
MINSIZE 4<br>
COLOR 255 0 0<br>
OUTLINECOLOR 0 255 255<br>
BACKGROUNDSHADOWSIZE 1 1<br>
POSITION cc<br>
ANTIALIAS FALSE<br>
FORCE FALSE<br>
PARTIALS FALSE<br>
END<br>
END<br>
END<br>
<br>
As you can see the difference between the two kinds of tab file, <br>
• 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.<br>
• the other set Chinese character to the NAME field, in which I can set one layer with STYLEITEM AUTO, and another layer with LABELITEM.<br>
Can anyone solve the problem I described in this post?<br>
Waiting for your reply. Thanks very much.<br>
<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div><br></div>