You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some problems with capitalize function and national characters.
Call capitalize of "Křížek přemysl" results in "KřížEk PřEmysl"
In people_table.html in htmlx_templatepro is defined
<td>{{:person.FirstName|capitalize}}</td>
Capitalize function is implemented in TemplatePro.pas. Instead of defining list of allowed chars it is better for me to define NOTALLOWEDCHARS. Then it works fine. But I do not know all use cases of that function, it can break something on the other place.
functionCapitalizeString(const s: string; const CapitalizeFirst: Boolean): string;
const// ALLOWEDCHARS = ['a' .. 'z', '_'];
NOTALLOWEDCHARS = [''];
var
index: Integer;
bCapitalizeNext: Boolean;
begin
bCapitalizeNext := CapitalizeFirst;
Result := lowercase(s);
if Result <> EmptyStr thenbeginfor index := 1to Length(Result) dobeginif bCapitalizeNext thenbegin
Result[index] := UpCase(Result[index]);
bCapitalizeNext := False;
end// else if not CharInSet(Result[index], ALLOWEDCHARS) thenelseif CharInSet(Result[index], NOTALLOWEDCHARS) thenbegin
bCapitalizeNext := True;
end;
end; // forend; // ifend;
Thank you.
The text was updated successfully, but these errors were encountered:
There are some problems with capitalize function and national characters.
Call capitalize of "Křížek přemysl" results in "KřížEk PřEmysl"
In people_table.html in htmlx_templatepro is defined
Capitalize function is implemented in TemplatePro.pas. Instead of defining list of allowed chars it is better for me to define NOTALLOWEDCHARS. Then it works fine. But I do not know all use cases of that function, it can break something on the other place.
Thank you.
The text was updated successfully, but these errors were encountered: