View Issue Details

IDProjectCategoryView StatusLast Update
0004588JEDI VCL00 JVCL Componentspublic2009-10-03 19:09
ReporterwessonAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.39 
Summary0004588: JvAppIniStorage: Render it completely unicode compliant
DescriptionJvAppIniStorage uses internally a TMemIniFile which load/save data as Ansi

So, ini files created are not unicode compliant (they need their codepage to convert them to unicode)

make it fully unicode compliant, taking into account the TMemIniFile bug in Delphi that prevent them to properly detect UTF-8 prefix
Additional Informationproposed patch attached
TagsNo tags attached.

Activities

2008-11-17 03:35

 

JvAppIniStorage_utf8_as_default.patch (648 bytes)
Index: JvAppIniStorage.pas
===================================================================
--- JvAppIniStorage.pas	(revision 12048)
+++ JvAppIniStorage.pas	(working copy)
@@ -253,7 +253,7 @@
   {$IFDEF DELPHI7}
   FIniFile := TJvMemIniFile.Create(Name);
   {$ELSE}
-  FIniFile := TMemIniFile.Create(Name);
+  FIniFile := TMemIniFile.Create(Name{$IFDEF COMPILER12_UP},TEncoding.UTF8{$ENDIF});
   {$ENDIF DELPHI7}
 end;
 
@@ -795,6 +795,9 @@
 procedure TJvAppIniFileStorage.FlushInternal;
 begin
   IniFile.Rename(FullFileName, False);
+{$IFDEF COMPILER12_UP}
+  IniFile.Encoding := TEncoding.UTF8;
+{$ENDIF}
   IniFile.UpdateFile;
 end;
 

obones

2008-12-22 05:21

administrator   ~0015148

Better add a new public property with the encoding for anyone to use.

AHUser

2009-10-03 19:09

developer   ~0016237

Added new property Encoding: TEncoding.

Issue History

Date Modified Username Field Change
2008-11-17 03:35 wesson New Issue
2008-11-17 03:35 wesson File Added: JvAppIniStorage_utf8_as_default.patch
2008-11-18 08:24 obones Status new => acknowledged
2008-12-22 05:21 obones Note Added: 0015148
2008-12-22 05:21 obones Status acknowledged => confirmed
2009-10-03 19:09 AHUser Note Added: 0016237
2009-10-03 19:09 AHUser Status confirmed => resolved
2009-10-03 19:09 AHUser Fixed in Version => Daily / SVN
2009-10-03 19:09 AHUser Resolution open => fixed
2009-10-03 19:09 AHUser Assigned To => AHUser