Re: [Lazarus] OFF-TOPIC: Naming of char [[[Re: Debugging the unicode RTL]]]

2023-01-22 Thread Martin Frb via lazarus
On 22/01/2023 13:12, Marco van de Voort via lazarus wrote: On 22-1-2023 12:39, Martin Frb via lazarus wrote: They should be called AnsiCodepoint UniCodeCodePoint No, since in the case of a surrogate it is not a codepoint either. It is the unit of encoding granularity, nothing more. Ouch, y

Re: [Lazarus] OFF-TOPIC: Naming of char [[[Re: Debugging the unicode RTL]]]

2023-01-22 Thread Marco van de Voort via lazarus
On 22-1-2023 12:39, Martin Frb via lazarus wrote: They should be called AnsiCodepoint UniCodeCodePoint No, since in the case of a surrogate it is not a codepoint either. It is the unit of encoding granularity, nothing more. But anyway, that ship sailed in (D)2009.  It is probably the ever

[Lazarus] To be a string or not to be a string (bitness independent?) [[[Re: Debugging the unicode RTL]]]

2023-01-22 Thread Martin Frb via lazarus
On 22/01/2023 11:24, Martin Frb via lazarus wrote: Though this relies on being able to detect    PChar  <>  String  <>  array of char which is a PITA. Example:   FPC 3.3.1 (but IIRC also 3.2.x)   tested on Win, but similar on other OS   dwarf-3 var   s1: AnsiString;   s2: array of char; Both

[Lazarus] OFF-TOPIC: Naming of char [[[Re: Debugging the unicode RTL]]]

2023-01-22 Thread Martin Frb via lazarus
On 22/01/2023 11:53, Michael Van Canneyt via lazarus wrote: Since the PChar/Char types are now an alias, logically the debug info should only have references to AnsiChar/UnicodeChar. Well technically neither of them is (always) an actual character. They should be called AnsiCodepoint UniCodeC

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Martin Frb via lazarus
On 22/01/2023 11:53, Michael Van Canneyt via lazarus wrote: Since the PChar/Char types are now an alias, logically the debug info should only have references to AnsiChar/UnicodeChar. But I have no idea how to test this assumption. if adding a watch containing  "^char(x)" fails, then that wi

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Martin Frb via lazarus
I may have to double check some details, just going from memory On 22/01/2023 11:46, Michael Van Canneyt wrote: On Sun, 22 Jan 2023, Martin Frb via lazarus wrote: On 12/01/2023 10:42, Michael Van Canneyt via lazarus wrote: - Debugging programs works in general quite OK, except for displa

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Michael Van Canneyt via lazarus
On Sun, 22 Jan 2023, Martin Frb via lazarus wrote: On 12/01/2023 11:26, Michael Van Canneyt via lazarus wrote: It needs to determine the definition of "string" which will be an array of unicodechar or ansichar. Once it knows that, the rest will follow, since the definition of unicodechar o

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Michael Van Canneyt via lazarus
On Sun, 22 Jan 2023, Martin Frb via lazarus wrote: On 12/01/2023 10:42, Michael Van Canneyt via lazarus wrote: - Debugging programs works in general quite OK, except for displaying of   some strings. Most notable, the exception message is affected:   only the first character of the exception

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Martin Frb via lazarus
On 22/01/2023 11:24, Martin Frb via lazarus wrote: 2/ Where can I find the code that extracts the message from an exception object ? So I can have a shot at trying to fix the display. unit FpDebugDebugger; procedure TFpDebugDebugger.HandleSoftwareException Important: If you make any

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Martin Frb via lazarus
On 12/01/2023 11:26, Michael Van Canneyt via lazarus wrote: It needs to determine the definition of "string" which will be an array of unicodechar or ansichar. Once it knows that, the rest will follow, since the definition of unicodechar or ansichar will have the correct size. The big iss

Re: [Lazarus] Debugging the unicode RTL

2023-01-22 Thread Martin Frb via lazarus
On 12/01/2023 10:42, Michael Van Canneyt via lazarus wrote: - Debugging programs works in general quite OK, except for displaying of   some strings. Most notable, the exception message is affected:   only the first character of the exception message is shown. This is hardcoded, and may be chan