Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-05-26 Thread Ernest V Miller
I'll bend my knees to fair gods for your health! Martin laza...@mfriebe.de написано 17.05.2013 18:51:53: On 27/03/2013 04:08, Ernest V Miller wrote: I see value of utf8 in russian. And I am absolutely happy. But as soon as I want to use fixed strings, the only way for me to see my native

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-05-17 Thread Martin
On 27/03/2013 04:08, Ernest V Miller wrote: I see value of utf8 in russian. And I am absolutely happy. But as soon as I want to use fixed strings, the only way for me to see my native language when debugging is to declare an additional string var as you can see below: I committed a partial fix

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Ernest V Miller
Martin laza...@mfriebe.de написано 29.03.2013 10:21:16: Ok, than you have an error that I can not reproduce on my system. I made my observation from reproducing the effects on my system as close as I can get to it. For me GDB never did the ??? thing. Can you generate a log please

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Martin
On 01/04/2013 07:34, Ernest V Miller wrote: Sent log source to laza...@mfriebe.de. Ok, I can see what happens. Your GDB returns slightly different from mine (but correct). And it triggers the Code for utf8 correction. That is why you actually see the proper utf8 string, while I

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Martin
On 01/04/2013 10:13, Martin wrote: On 01/04/2013 07:34, Ernest V Miller wrote: Sent log source to laza...@mfriebe.de. Ok, I can see what happens. I added in on mantis http://bugs.freepascal.org/view.php?id=24199 -- ___ Lazarus mailing

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Mattias Gaertner
On Mon, 01 Apr 2013 10:13:22 +0100 Martin laza...@mfriebe.de wrote: [...] It could do a heuristic, checking if the result has such invalid chars, and if there is one then do all as #123. But an ascii sting may be a valid utf8 string sometimes, yet the utf8 would map to entirely different

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Martin
On 01/04/2013 10:53, Mattias Gaertner wrote: On Mon, 01 Apr 2013 10:13:22 +0100 Martin laza...@mfriebe.de wrote: [...] It could do a heuristic, checking if the result has such invalid chars, and if there is one then do all as #123. But an ascii sting may be a valid utf8 string sometimes, yet

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Mattias Gaertner
On Mon, 01 Apr 2013 11:03:31 +0100 Martin laza...@mfriebe.de wrote: On 01/04/2013 10:53, Mattias Gaertner wrote: On Mon, 01 Apr 2013 10:13:22 +0100 Martin laza...@mfriebe.de wrote: [...] It could do a heuristic, checking if the result has such invalid chars, and if there is one then

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Martin
On 01/04/2013 11:18, Mattias Gaertner wrote: On Mon, 01 Apr 2013 11:03:31 +0100 Martin laza...@mfriebe.de wrote: On 01/04/2013 10:53, Mattias Gaertner wrote: On Mon, 01 Apr 2013 10:13:22 +0100 Martin laza...@mfriebe.de wrote: [...] It could do a heuristic, checking if the result has such

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-04-01 Thread Mattias Gaertner
On Mon, 01 Apr 2013 11:30:59 +0100 Martin laza...@mfriebe.de wrote: On 01/04/2013 11:18, Mattias Gaertner wrote: On Mon, 01 Apr 2013 11:03:31 +0100 Martin laza...@mfriebe.de wrote: On 01/04/2013 10:53, Mattias Gaertner wrote: On Mon, 01 Apr 2013 10:13:22 +0100 Martin

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-28 Thread Martin
Sorry, I looked at the wrong part of your mail. I thought this was about the #208#154 representation. Probably because I had never debugged anything that caused the ???. Maybe I did reproduce it now Also in your first example ansi := Utf8ToAnsi('Кукла'); is that cyrillic? Can that be

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-28 Thread Ernest V Miller
Martin laza...@mfriebe.de написано 28.03.2013 19:58:17: Also in your first example ansi := Utf8ToAnsi('Кукла'); is that cyrillic? Can that be translated into ansi on your system? Have you tried to output the string for i := 1 to length(ansi) do s := s + inttostr(ord(ansi[i]))+', ';

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-28 Thread Martin
On 29/03/2013 01:18, Ernest V Miller wrote: There are 2 issues (in what I reproduced): 1) *** ??? Actually the ? are really present in the string. They are put there by Utf8ToAnsi for characters that could not be translated to ansi. So in that the debugger shows the correct content. At

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-27 Thread Martin
On 27/03/2013 04:08, Ernest V Miller wrote: Hello! As we know, Lazarus is UTF8 friendly. When I want to see a value of a string var in cyrillic, I should convert it to UTF8, else I only get ? in Watches window. For this code function TesterClass.quickTest : Boolean; var

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-27 Thread Ernest V Miller
As you could see in my previous examples, Lazarus shows the content of variable string correctly, no matter how the symbols are encoded. So there is no need in special encoding options in Watches. The point is that when IDE evaluates the string content, there is a difference for it whether the

[Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-26 Thread Ernest V Miller
Hello! As we know, Lazarus is UTF8 friendly. When I want to see a value of a string var in cyrillic, I should convert it to UTF8, else I only get ? in Watches window. For this code function TesterClass.quickTest : Boolean; var utf8, ansi : string; stf : string[50];

Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-26 Thread Paul Ishenin
27.03.2013 12:08, Ernest V Miller wrote: I consider having a special string var for debugging russian is completely stupid. Maybe I don't know some GDB tweak to force it to recognize the characters of my ancestry in fixed strings? At the moment (FPC 2.6.x) ansistring variables does not