COVESA / dlt-viewer

Diagnostic Log and Trace viewing program
Other
420 stars 238 forks source link

DLTViewerPlugin message window modifies message (removes 1 space if there are 2). #425

Closed vpatelv closed 5 months ago

vpatelv commented 6 months ago

The message window of the DLTViewerPlugin appears to automatically format for extra spaces. This makes searches unpredictable when copying payload data from the message window.

For example. Actual payload (with 2 spaces between ":" and "1"): Version: 123 DLTViewerPlugin message display (with 1 space between ":" and "1"): Version: 123

Edit: Github appears to be doing the same...

alexmucde commented 6 months ago

@vpatelv The following line is used to display the DLT message in the plugin:

form->setTextBrowserUncoded(msg.toStringHeader()+"

"+stringToHtml(msg.toStringPayload()));

It is displayed in a HTML widget. In HTML extra spaces are removed, that is the reason.

https://stackoverflow.com/questions/17784595/do-browsers-remove-whitespace-in-between-text-of-any-html-tag

Instead of copying the message from the plugin, please use the Ctrl+C function or the "Copy Selection to Clipboard" function in the context menu when you right click ath the selected line.

alexmucde commented 5 months ago

@vpatelv Does this help? Then we can close the ticket.

vpatelv commented 5 months ago

Thanks for explaining the behavior. Ideally I would have preferred to copy only the payload, but I will deal with copying the entire line. Yes we can close it, thank you.