Thanks, I try gml2 output and it deals with chinese characters correctly.
But another problem occurs. OpenLayers shows that the server's reponse isn't
well-formed.
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="
http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs"
xmlns:nansong="http://www.cadal.org/nansong" xmlns:gml="
http://www.opengis.net/gml" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.cadal.org/nansong
http://10.15.69.77:8888/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=<http://10.15.69.77:8888/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=>
nansong%3A1208_%3F%3F%3F%3F%3F http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember><
nansong:1208_州府级驻点fid="1208_州府级驻点.82"><nansong:the_geom><gml:Point srsName="
http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:coordinates xmlns:gml="
http://www.opengis.net/gml" decimal="." cs="," ts="
">111.63142796,26.25247816</gml:coordinates></gml:Point></nansong:the_geom><nansong:NAME_CH>永州</nansong:NAME_CH><nansong:NAME_PY>Yongzhou</nansong:NAME_PY><nansong:NAME_FT>永州</nansong:NAME_FT><nansong:TYPE_CH>州</nansong:TYPE_CH><nansong:TYPE_PY>Zhou</nansong:TYPE_PY><nansong:PRES_LOC/><nansong:X_COOR>111.63142796221</nansong:X_COOR><nansong:Y_COOR>26.25247815675</nansong:Y_COOR><nansong:BEG_YR>1028</nansong:BEG_YR><nansong:END_YR>1028</nansong:END_YR><nansong:DYN_PY>Nansong</nansong:DYN_PY><nansong:DYN_CH>南宋</nansong:DYN_CH><nansong:SYS_ID>100985</nansong:SYS_ID><nansong:COMPILER/><nansong:LEV_RANG/><nansong:BEG_RULE/><nansong:END_RULE/><nansong:LEV1_PY/><nansong:LEV1_CH/><nansong:LEV2_PY/><nansong:LEV2_CH/><nansong:COUN_PY/><nansong:COUN_CH/><nansong:NOTE_ID/><nansong:OBJ_TYPE/><nansong:GEO_ID/><nansong:GEO_SRC/><nansong:GEOCOMPER/><nansong:CHECKER/><nansong:ENT_DATE/></nansong:1208_州府级驻点></gml:featureMember></wfs:FeatureCollection>
When I open the response with gedit or firefox or vim, all shows that
there's something with the node <nansong:1208_州府级驻点>...</...>. But when I
compare the response with another response which the server gives in the
DEMO getFeature-1.0, I find that the only difference is that in the first
response the namespace nansong is followed by a layer name which contains
chinese character while in the other not. Here is the demo's response:
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="
http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp"
xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.openplans.org/topp
http://10.15.69.77:8888/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp%3Astates<http://10.15.69.77:8888/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp%3Astates>
http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
"><gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember>
<topp:states fid="states.3"><topp:the_geom><gml:MultiPolygon srsName="
http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates
xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts="
">-75.70742,38.557476 -75.71106,38.649551 -75.724937,38.83017
-75.752922,39.141548 -75.761658,39.247753 -75.764664,39.295849
-75.772697,39.383007 -75.791435,39.723755 -75.775269,39.724442
-75.745934,39.774818 -75.695114,39.820347 -75.644341,39.838196
-75.583794,39.840008 -75.470345,39.826435 -75.42083,39.79887
-75.412117,39.789658 -75.428009,39.77813 -75.460754,39.763248
-75.475128,39.741718 -75.476334,39.719971 -75.489639,39.714745
-75.610725,39.612793 -75.562996,39.566723 -75.590187,39.463768
-75.515572,39.36694 -75.402481,39.257637 -75.397728,39.073036
-75.324852,39.012386 -75.307899,38.945911 -75.190941,38.80867
-75.083138,38.799812 -75.045998,38.44949 -75.068298,38.449963
-75.093094,38.450451 -75.350204,38.455208 -75.69915,38.463066
-75.70742,38.557476</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></topp:the_geom><topp:STATE_NAME>Delaware</topp:STATE_NAME><topp:STATE_FIPS>10</topp:STATE_FIPS><topp:SUB_REGION>S
Atl</topp:SUB_REGION><topp:STATE_ABBR>DE</topp:STATE_ABBR><topp:LAND_KM>5062.456</topp:LAND_KM><topp:WATER_KM>1385.022</topp:WATER_KM><topp:PERSONS>666168.0</topp:PERSONS><topp:FAMILIES>175867.0</topp:FAMILIES><topp:HOUSHOLD>247497.0</topp:HOUSHOLD><topp:MALE>322968.0</topp:MALE><topp:FEMALE>343200.0</topp:FEMALE><topp:WORKERS>247566.0</topp:WORKERS><topp:DRVALONE>258087.0</topp:DRVALONE><topp:CARPOOL>42968.0</topp:CARPOOL><topp:PUBTRANS>8069.0</topp:PUBTRANS><topp:EMPLOYED>335147.0</topp:EMPLOYED><topp:UNEMPLOY>13945.0</topp:UNEMPLOY><topp:SERVICE>87973.0</topp:SERVICE><topp:MANUAL>44140.0</topp:MANUAL><topp:P_MALE>0.485</topp:P_MALE><topp:P_FEMALE>0.515</topp:P_FEMALE><topp:SAMP_POP>102776.0</topp:SAMP_POP></topp:states></gml:featureMember></wfs:FeatureCollection>
OpenLayers, gedit, firefox , vim don't show any warning. It seems that the
demo's response's format is legal.
Does the chinese character leads to the wrong parsing of the response? How
can I resolve the problem?
--
luoji...@zju
http://www.luojs.com
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users