Quote:
Originally Posted by Cesar82
Thank you for the informations.
It really is wrong and the solution is the same.
Maybe including something to remove the first space in the value if it exists would be interesting.
|
Yeah, that should be easy now, i just leaved it that way because i was too tired yesterday to keep looking. Will take a look in a few and update this message with the full code change. I'm still testing out the new CIU, lot of things have changed since 2020.
Thank's to you for keeping this up !!!
EDIT:
So seems like adding Trim to the LineDecode was enough to fix the spacing issue. I've done some tests and all went fine. 1st test was to just let CIU make a clean .ini with the language feature, second test was letting CIU modify an existent .ini to replace the value with the language feature and another test to add custom values without the language feature. All went fine. So here is the original code on the latest beta hf2 (from december) and the only little change i made to it.
Original:
Code:
begin
if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
begin
IniValue := LineDecode(TmpStr, '', '');
if (IniValue = '') or ((Pos('=', IniValue) > 0) and (Pos('|', IniValue) > 0) and (Pos(LowerCase(ActLangShort + '='), LowerCase(IniValue)) = 0)) then
Modified (marked in red):
Code:
begin
if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
begin
IniValue := Trim(LineDecode(TmpStr, 'Value', ''));
if (IniValue = '') or ((Pos('=', IniValue) > 0) and (Pos('|', IniValue) > 0) and (Pos(LowerCase(ActLangShort + '='), LowerCase(IniValue)) = 0)) then