Hi,

Below is a message posted by Valdimir (russian developer).  We
detected issues in the fpGUI File Open/Save dialog.

Standard RTL functions like FindFirst, FindNext, SetCurrentDir etc all
use different encodings based on the OS used.  fpGUI uses UTF-8
internally. MSEgui uses WideString internally.  Now that Lazarus is
moving towards UTF-8 encoding, you guys might start experiencing the
same issues.

------------[ Forward ]------------------
Working with SysUtils.FindFirst and FindNext routines I found that the encoding
of resulting TSearchRec record fields differs across platforms.
Under Windows it seems to be ANSI and under Linux it seems to be UTF-8.
The problem is that application expects the same encoding everywhere.
Is there any way to determine the resulting encoding to convert fields
to the encoding I need?
------------[ end ]------------------

Solution in fpGUI and MSEgui.  Create your own RTL functions dependent
per platform.
eg:
  fpgSetCurrentDirectory()
    Under Linux it uses UTF-8 so is a wrapper for RTL SetCurrentDirectory.
    Under Windows we have to convert UTF-8 to ANSI or WideString and
call the appropriate Windows.SetCurrentDirectory[A,W] functions.

This starts making the RTL system functions more difficult to use. Or
rather with caution.  The developer need to know that instead of the
standard RTL functions, they need to use the wrapper functions of the
toolkit (fpgFindFirst, fpgFindNext). Anybody else got a better idea in
how to solve this issue.  Can RTL handle this automatically in any
way?


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to