[Shapelib] DBFWriteStringAttribute whit iso8859_1 (Danish character)

Frank Warmerdam fwarmerdam at gmail.com
Fri Jun 24 09:41:14 EDT 2005


On 6/24/05, Hanne Ribergaard <hanne.ribergaard at breakoutimage.dk> wrote:
> I have another beginner's problem: 
> 
> When call DBFWriteStringAttribute the Danish characters in pszFieldValue are
> displayed wrong in the final shape file. 
> 
> I'm sure that the sting is ok before calling DBFWriteStringAttribute. 
> 
> When I call DBFAddField where pszFieldName is containing Danish letters,
> there are no problems. This mean that the fieldnames in my shape file look
> fine but the values are not displayed correctly. What can bee wrong? 

Hanne, 

I don't think that Shapelib is performing any character set transformations
on values going into and out of string attributes so it seems the problem
is likely how the display application interpretes the characters. 

What do the characters look like if you do a "dbfdump" on the file?

It is possible that there is some sort of character set setting that can
be put in a .dbf file, but if there is I don't know about it and certainly
don't try to set it intelligently.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Shapelib mailing list