Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How to use udig's label render correctly display chinese Character(encoding=GBK)?

Hi xioyong.

The renderer we use (from GeoTools) works fine with korean characters when I last checked.

One thing you may need to do is change the shapefile charset to the GBK encoding. There is supposed to be  a preference  page setting for this one but I could not see it on uDig 1.2 just now (perhaps it needs to be brought forward from 1.1.x).

The connection parameters for shapefile datastore are something like:

        Map<String,Object> params = new HashMap<String,Object>();
        params.put( ShapefileDataStoreFactory.URLP.key, file.toURI().toURL() );
        params.put( ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, false );
        params.put( ShapefileDataStoreFactory.MEMORY_MAPPED.key, false );
        params.put( ShapefileDataStoreFactory.DBFCHARSET.key, "ISO-8859-1" );

        

        DataStore store = DataStoreFinder.getDataStore( params );

The the datastore should be created in ShapeService.java
Jody

On 25/09/2009, at 6:28 PM, 唐小勇 wrote:

Hi All,

  I am using udig1.1.1 to display maps and render accoding to layer's fields. I find udig’s text label render can’t work correctly to display Chinese character, but can correctly display English labels. I think it may be the character encoding problem. I want to know how to modify the source code to meet the requirements of correctly displaying Chinese character (encoding= ‘GBK’) .

Thanks
                        xiaoyong tang
          2009-09-25
<xiaoyong tang.vcf>_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top