On 2013-12-29 00:06, Marcos Douglas wrote:
> because I always have to think about what encoding to use depending on
> which part of the code (eg: RTL is AnsiString, LCL is UTF-8, Synapse
> is AnsiString, some own packages are AnsiString too, two are UTF-8,

OK, I see what you mean - when interacting with 3rd party packages.


> Using fpGUI do you need to thinking about the encode or do you use UTF-8 at 
> all?
> You need to use functions, at all over code, like SysToUTF8?

fpGUI only uses UTF-8 internally, so developers using fpGUI simply use
the functions fpGUI supplies - instead of the FPC RTL ones. eg: use
fpgFindFirst instead of FindFirst. All such functions are the RTL names,
but with a 'fpg' prefix, so makes it easy to remember. They are all in a
single unit too, the fpg_utils.pas unit.

fpGUI also tries to hide the fact of what Unicode encoding is being used
used, that way it has methods like fpgFromOSEncoding() or
fpgToOSEncoding() instead of SysToUTF8() etc. I think the fpGUI ones are
easier to remember. NOTE: these two methods will only be used if
interacting with 3rd party packages... fpGUI handles the RTL for the
developer already. And if some RTL method isn't covered, I'll add it
quickly - as it is very simple to do.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to