Unicode BOM chars randomly inserted [Urgent]

Discuss KeyNote NF bugs
Post Reply
psdie
Posts: 4
Joined: 29 Aug 2011, 23:43

Unicode BOM chars randomly inserted [Urgent]

Post by psdie »

- Issue tracker #410: http://code.google.com/p/keynote-nf/iss ... ail?id=410
- KeyNote NF v1.7.8.1 on Win7 64-bit (normal NTFS partitions)

Since switching to KeyNote NF (great work Daniel, thank you! :D) I'm seeing random fairly frequent weird corruption in the text of some nodes, which I've established is being caused by Unicode BOM characters being inserted at random points in ANSI Virtual Node text files.

Here's the hopefully reproducible steps:

1. Create new blank text document in Notepad.
2. Link to as Virtual Node in KeyNote NF.
3. Go to this SmashingMagazine.com article (random page I found that triggers this): http://bit.ly/DNyW2
4. Press CTRL+A then CTRL+C to copy the page contents.
5. Switch to the new Virtual Node in KeyNote, paste the clipboard contents.
6. Text will appear fine for the moment - but switch nodes (so saves) and open the original text file. You'll see the weird text size corruption on "This is an alternative to the Posterization m?ethod .." and it will claim UTF-8 format when you Save As.

If you look at the same line in KeyNote, you'll notice character corruption on the word "method". I've attached the text file as an example ("test3.txt") - if you look in a hex editor, you'll notice [EF BB BF] has been added after the "e" in "method" on the corrupted line. The same occurs on the other corrupted lines (often repeated multiple times).

Note that random corruption like the above doesn't just appear to affect pasted text. I regularly type out notes by hand, then return to the section a few days later to see character corruption (which I now presume is caused by randomly inserted BOM marks). I don't edit the Virtual Node text files in any other app BTW.

This is clearly a bug - hopefully the above is enough to identify a fix? Many thanks for your great work Daniel!

Cheers, Ben
psdie
Posts: 4
Joined: 29 Aug 2011, 23:43

Re: Unicode BOM chars randomly inserted [Urgent]

Post by psdie »

Bugger - just noticed that at least one of my normal nodes (plain text standard node, not a Virtual Node) has identical symptoms - looks like this bug has a wider impact than first though :shock:

Good news is I was able to fix the Virtual Node by doing a "Replace in Files" via UltraEdit (but could use any editor - Dreamweaver etc), replacing the BOM "" (<-- chars seems to be appearing OK here, should be copyable) with nothing.

This also appeared to work for the main KeyNote file - remove encryption, open the .knt file in text editor, search and replace BOM marks. Could this cause side effects? :?: This is also a temporary fix - it won't fix the underlying bug.

Thanks, Ben
psdie
Posts: 4
Joined: 29 Aug 2011, 23:43

Re: Unicode BOM chars randomly inserted [Urgent]

Post by psdie »

Meh - I also ran into a separate bug for first time: I tried using "File > Export..." to export all notes to plain text (as a backup) and got a fatal error which crashes KeyNote: "Error while exporting notes: Access violation at address 68F7981E in module 'MSFTEDIT.DLL'. Read of address 0019B3DB".

If I selectively export certain notes, 6 out of the 8 work (including some with BOM issues, so that doesn't seem to be directly causing the crash). If I choose "Export each node to a separate target file", all work fine, whereas "Put all tree nodes in a single target file" crashes (when certain notes are included). Hmmm - chalk that up as a seperate bug! :geek:

Cheers, Ben
psdie
Posts: 4
Joined: 29 Aug 2011, 23:43

Re: Unicode BOM chars randomly inserted [Urgent]

Post by psdie »

Any ideas on this? After searching and replacing the .knt file to remove all BOM sequences, they've gradually been coming back :( Weighing up going back to original KeyNote, as this definitely never occurred previously.

Thanks, Ben
Post Reply