Forum > Designer
Maskedit usage problems
szlbz:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39781
szlbz:
刚debug发现是fpc 单元fpcsrc/packages/rtl-extra/src/unix/clocale.pp引起的,按以下方法修改就可以返回正确的分隔字符。
It has just been found in the debug that it is caused by the fpcsrc/packages/rtl-extra/src/unix/clocale.pp of the FPC unit,
modify: function FindSeparator(const s: string; Def: char): char;
can return the correct separator character.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- function FindSeparator(const s: string; Def: char): utf8char; var i: integer; ss:string; begin FindSeparator := Def; i := Pos('%', s); if i=0 then Exit; inc(i); SkipModifiers(s, i); inc(i); //if i<=Length(s) then // FindSeparator:=s[i]; if i<=Length(s) then ss:=UTF8Copy(s,i,1); if (ss='年') or (ss='月') or (ss='日') then FindSeparator :='-' ELSE if (ss='时') or (ss='分') or (ss='秒') then FindSeparator :=':' else FindSeparator:=s[i]; end;
Bart:
Ok, if the bug is in FPC, then file a bugreport in the FPC bugtracker please.
Bart
szlbz:
--- Quote from: Bart on June 02, 2022, 12:09:57 pm ---Ok, if the bug is in FPC, then file a bugreport in the FPC bugtracker please.
Bart
--- End quote ---
https://gitlab.com/freepascal.org/fpc/source/-/issues/39756
Navigation
[0] Message Index
[*] Previous page