2009/3/10 Murty Maganti <mmaga...@oriongis.com>

>  Hi
>
>
>
> As per the code documentation in the method msGetEncodedString (as shown
> below), the characters are assumed to be UTF-8 by default.
>
>
>
> char *msGetEncodedString(const char *string, const char *encoding)
>
> {
>
> ---
>
>   if (len == 0 || (encoding && strcasecmp(encoding, "UTF-8")==0))
>
>       return strdup(string);    /* Nothing to do: string already in UTF-8
> */
>
>
>
> Where as in the ‘values’ property of shapeObj.cs in C#, it is using
> System.Runtime.InteropServices.Marshal.PtrToStringAnsi  (to marshal
> characters from c to c#). Shoudn’t it be using
> System.Runtime.InteropServices.Marshal.PtrToStringUni method since as the
> charcters are by default held in UTF-8 encoding?
>
>
I don't think so. These 2 representations are quite different. UTF-8 use 8
bit representation with varying character length (1-4) , while unicode use
16 bit / character by default.
msGetEncodedString is used to transform the labels during the drawing in case
if the encoding parameter is specified, but this function haven't been
utilized when retieving the shape values.


Best regards,

Tamas
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to