[mapserver-dev] Arabic labeling problem ?!!!

Stephen Woodbridge woodbri at swoodbridge.com
Tue Sep 16 09:54:40 EDT 2008


Saka,

You can not just change the encoding in the mapfile to UTF8, because 
your data is in 'ISO8859-6' or 'Windows-1256'. You HAVE to convert you 
data to UTF8 FIRST, Then use ENCODING 'UTF8'.

There are not a lot of tools to help you do this. If you have 
postgresql/postgis loaded somewhere, then you can:

1) create a UTF8 database
2) load the shapefile using shp2pgsql -E 'ISO8859-6' ...
3) dump the table using pgsql2shp ...

This should convert your data to UTF8.

Or you might write a Perl program to read the XBase *.dbf file and 
convert all the fields using Text::Iconv to UTF8.

If you don't do this first then do not expect to get useful results.

-Steve W

Saka Royban wrote:
> 
> Hi all.
> I've asked this problem in MS4W mailing list but no success. Jeff 
> McKenna guided me to here, thanks to him.
> it sounds it originally relates to mapserver
> According to what History.txt  for MS4W2.2.8 says, problem for arabic 
> and hebrew languages has been solved by using UTF8. But i couldn't get a 
> good result.
> In fact, UTF8 doesn't show letters correctly (just some symbols). i have 
> tried lots of fonts but the same result.
> in current version, the problem of joining letters have been solved 
> because i can get result using 'ISO8859-6' encoding which is for arabic 
> but now this encoding changes some of letters with each other.
> In last version, 'Windows-1256' encoding (for arabic) worked well for 
> showing letters just they were separate not joint. but in cuurent 
> versions this encoding just shows some symbols.
> I'm confused. maybe i should setup sth which i don't do or i don't know 
> sth else.
> that would be my appreciate to help me because it is really a need. Maps 
> without labels have less usage.
> Thanks in advance
> (See attachments)
> My Mapfile: 
> LABEL
>   TYPE TrueType
>   FONT timesnewromans
>   ENCODING 'windows-1256'
>   SIZE 12
> END
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list