The scripts are there to illustrate the principle, not to be judged. It doesn't really matter which script is better, the fact is this:

The log viewer, as currently implemented, is meant to display what is in the log file as if it were plain text. I see nothing wrong with this principle, since it is equivalent to what mIRC used to do when it delegated to notepad.exe.

If users want the log viewer to be a more accurate representation of the original channel buffer, so be it-- request that. The current implementation, however, is not buggy, broken, or flawed. It does exactly what it is supposed to do, and that is: it shows you what is in your text files (text files that happen to have IRC logs in them).

Personally, I'd rather it behave in its current form than try to accurately represent the original buffer. That way, when a line has control codes in specific places or is coloured in a certain way, I know that these control codes are located in the file, and mIRC didn't just magically recreate them. Ultimately, I use a log viewer to look at a raw archived file for the contents of the file, not for the purpose of recreating an IRC experience. I have channel windows for that.