New XML Format for logs

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

New XML Format for logs

Post by Ciege » Fri Apr 08, 2011 7:03 pm

I am curious as to why you added Unicode to the XML logs?
I use a tool called Textpad to open the text representation of the logs in their TMP format while tests are running on remote machines. This way I can watch all the log messages real time while my tests are running. The Textpad tool automatically refreshes so when the log updates it is updated on my screen.

The thing is now with 3.x I get a warning every time I open a log file that Unicode is present (Textpad does not support Unicode) so my real time log watch isn't exactly automatic anymore as I have to constantly accept the warning.

I could move to another tool, but we already own Textpad here and no sense in purchasing another. Also, this worked perfectly for me in 2.x.

Is there any way to turn off the Unicode generation in the XML files so that I can work around this issue?

Thanks...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New XML Format for logs

Post by Support Team » Mon Apr 11, 2011 11:57 am

Ciege wrote:I am curious as to why you added Unicode to the XML logs?
We did not, Unicode was used since 2.0.0 for all Ranorex related files (rxrec, rxrep, rxlog, ...). Otherwise we could not support languages other than English (and only a very limited amount of signs and other characters). BTW Unicode (in particular UTF8) is the default encoding used by the .NET Framework and the default and recommended encoding for XML files.

The only thing that might have changed is that a BOM (byte order mark) is inserted at the beginning of the file, helping to detect the encoding when reading the file. Maybe that is the cause why now your editor correctly detects UTF8.
Ciege wrote:Textpad does not support Unicode
Really? I thought pure ASCII editors are gone since a decade. Isn't there a newer version of that program supporting Unicode?

Regards,
Alex
Ranorex Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: New XML Format for logs

Post by Ciege » Mon Apr 11, 2011 4:04 pm

Support Team wrote: Really? I thought pure ASCII editors are gone since a decade. Isn't there a newer version of that program supporting Unicode?
One would think right? Well, unfortunately this is one that still exists and is very popular.
For whatever reason the new 3.x version of the logs fail to load properly with Textpad while the 2.x versions load fine. I too would like to move to a different editor but Textpad is what I have here. I'll try to see if there is a freeware or cheap replacement I can use out there that has the functionality that I desire.

Thanks...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New XML Format for logs

Post by Support Team » Mon Apr 11, 2011 4:26 pm

Ciege wrote:Well, unfortunately this is one that still exists and is very popular.
Do you refer to textpad.com? If so, they claim to support Unicode since version 4.2.

An alternative would be Notepad++ - it's free, popular, and does not have problems with Unicode :D

Regards,
Alex
Ranorex Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: New XML Format for logs

Post by Ciege » Mon Apr 11, 2011 4:33 pm

I thought it strange as well and did check the site. After searching their forums there are many responses that Textpad does not support Unicode fully. They use a 8-bit character set so if the characters in the document are not in that character set then they will not be displayed properly. Therefore I get the warning that the unsupported characters will be converted to the system default character.
It's not so much the character conversion that is the issue to me, it's that when I have Textpad set to auto refresh (so I can keep a real time view of the test) every refresh results in the warning so I really don't have a real time view unless I constantly accept the warning dialog.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: New XML Format for logs

Post by Ciege » Mon Apr 11, 2011 8:22 pm

OK, looking a little closer at the actual text in the XML log file.
What is the character in front of Message Time? It looks like a "<" but there is a little tick mark over the top of the "<". That tick mark is not present in the 2.x files and seems to be the character that is causing the issue with Textpad. I missed that tick mark before because it just looked like a piece of lint or dust on my screen...
Please see the attached screenshots. These were taken with Notepad++
Attachments
2x Log.jpg
2x Log.jpg (10.11 KiB) Viewed 1160 times
3x Log.jpg
3x Log.jpg (12.88 KiB) Viewed 1160 times
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New XML Format for logs

Post by Support Team » Tue Apr 12, 2011 11:32 am

I checked the report files created by the legacy 2.X reporting functionality in 3.X with a binary editor - and your are right! There are some byte chunks that should not be there :?

When looking closer, I realized that the BOM (header to detect encoding) is written into the file before every message, that's why the editors do not really know how to interpret the next character. Somehow the XML writer was not initialized correctly - we fix that for the next maintenance release V3.0.2. Then TextPad should not issue that warning any more :)

Thank you for reporting this problem!

Regards,
Alex
Ranorex Team
.
Image

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: New XML Format for logs

Post by Ciege » Tue Apr 12, 2011 3:44 pm

Woohoo... Glad you guys found it... While I like Notepad++ the real time refresh of the loaded document was not nearly as good as what Textpad gave. So thanks for giving this another go around and fixing the issue!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: New XML Format for logs

Post by Ciege » Thu May 19, 2011 5:18 pm

Just loaded up 3.0.2 and this is indeed fixed.
It may have just been a small issue but it really does make all the difference in how work is done here.

Thanks a lot for getting this one!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New XML Format for logs

Post by Support Team » Thu May 19, 2011 9:54 pm

Ciege wrote:It may have just been a small issue but it really does make all the difference in how work is done here.
The issue was even too small to be spotted when that functionality was tested. Glad you found it and that it is fixed now! :D

Regards,
Alex
Ranorex Team
.
Image