summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_utils.pas6
-rw-r--r--src/gui/fpg_iniutils.pas4
2 files changed, 8 insertions, 2 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);
diff --git a/src/gui/fpg_iniutils.pas b/src/gui/fpg_iniutils.pas
index 36eb8bff..6bbe83bd 100644
--- a/src/gui/fpg_iniutils.pas
+++ b/src/gui/fpg_iniutils.pas
@@ -90,12 +90,12 @@ begin
if lFileName = '' then
- lFileName := ApplicationName + '.ini'
+ lFileName := fpgApplicationName + '.ini'
else if fpgExtractFileExt(lFileName) = '' then
lFileName := lFileName + '.ini';
lFileName := lDir + lFileName;
- Create(lFileName);
+ Create(fpgToOSEncoding(lFileName));
end;
function TfpgINIFile.ReadString(const ASection, AIdent, ADefault: string): string;