diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-04-19 13:23:54 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-04-19 13:25:07 +0100 |
commit | 4a5e1e3cde313dd197338064586c6f305af08128 (patch) | |
tree | d18aa484b189ea1deebee92b30ae8e17d05938f7 /src/corelib/fpg_utils.pas | |
parent | 7c05425017f7a3722765a204d98856d53f90f096 (diff) | |
download | fpGUI-4a5e1e3cde313dd197338064586c6f305af08128.tar.xz |
Another file system encoding fix for TfpgINIFile
- fpgApplicationName() wrapper for SyUtils.ApplicationName
- TfpgINIFile reference ApplicationName, instead of fpgApplicationName
- In TfpgINIFile we forgot to encode the file name back to the system
encoding before we called Create().
Diffstat (limited to 'src/corelib/fpg_utils.pas')
-rw-r--r-- | src/corelib/fpg_utils.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 9d0e907d..50167276 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -51,6 +51,7 @@ function fpgIsBitSet(const AData: integer; const AIndex: integer): boolean; // RTL wrapper filesystem functions with platform independant encoding // These functions are common for all platforms and rely on fpgXXXPlatformEncoding +function fpgApplicationName: TfpgString; function fpgFindFirst(const Path: TfpgString; Attr: longint; out Rslt: TSearchRec): longint; function fpgFindNext(var Rslt: TSearchRec): longint; function fpgGetCurrentDir: TfpgString; @@ -101,6 +102,11 @@ begin Result := ALine; end; +function fpgApplicationName: TfpgString; +begin + Result := fpgFromOSEncoding(ApplicationName); +end; + function fpgFindFirst(const Path: TfpgString; Attr: longint; out Rslt: TSearchRec): longint; begin Result := FindFirst(fpgToOSEncoding(Path), Attr, Rslt); |