[fpc-devel] [patch][rfc] pangocairo bindings and some related questions

Paul Ishenin webpirat at mail.ru
Thu Apr 30 01:29:11 CEST 2009


Martin Sucha wrote:
> 3. PGChar is defined as ^char, but string in PGchar is encoded using
> UTF-8 and automatic conversion from (wide)string to pchar does not
> use this encoding so I have to use conversion function like
>
> function StringToGChar(str:WideString):Pgchar;
> begin
>   Result := Pgchar(UTF8Encode(str));
> end;
>
> for every string argument to be able to use non-ascii characters in
> gtk/pango. Maybe we could add overloaded assignment operator that
> would handle this conversion. That would, however, break backward
> compatibility with programs using non-ascii characters that handle
> this conversion on their own.
>   
This way you will break lazarus since lazarus stores utf8 encoded 
strings in 'string' type.

Best regards,
Paul Ishenin.



More information about the fpc-devel mailing list