Hi, I should have been watching this thread as I've been solving the self same problem over the same timeframe. I've had the same problem with my iOS app because I read the tiddlywiki as UTF8 - and iOS is fussy enough to reject the file offhand if it is not pure UTF8. Had not realized that the problem was hitting other platforms too.
Here's what I found:
1. There are indeed non-UTF8 characters in 2.6.5. They are in the jQuery script. They go away in 2.6.6 I believe because 2.6.6 a uses a newer version of the jQuery script without the offending characters.
2. The problem characters are "\xA0" at character 15050 of the jQuery library script. The problem persists with Firefox because when Tiddlyfox saves it reads from the original file (including the offending bytes), transcludes the tiddler section, and writes back out - but neither the read nor the write includes a conversion to UTF8. What this means is that you end up with a potentially non UTF8 compliant file each time you save from FF17 with TiddlyFox. I think it should be possible to fix with a change the write statement in TiddlyFox - but I've been sluggish in looking at this in any more detail.
3. You can fix the problem for 2.6.5 tiddlywikis by running them through a e.g. iconv on Mac or Linux - to create a true UTF8 file. So far this has worked for me - including tiddlywikis with heavy jQuery use by plugins.
4. Of course you can also fix the problem by upgrading to 2.6.6.
Hope this helps.
Chris.
On Sunday, December 16, 2012 7:19:54 AM UTC-7, Michał Bagiński wrote:
Hi,
I had the same problem with wrong encoding when using this addon and TW 2.6.5. I have investigated the issue and wrote my own addon from scratch using Mozilla Add-on Builder. You can download it from http://ul.to/q7mrb1j4. Note that you need to uninstall TiddlyFox before testing mine because both addons don't work together properly.
I'll let you test it and if it works fine, either I'll try to fix Jeremy's addon or agree with him to take mine because two simple addons doing the same thing certainly don't make sense; this is why I haven't published mine on Mozilla Add-ons website.
Some technical remarks: jQuery embedded in TW 2.6.5 contains one two-byte UTF-8 character, it's just after the &&(e.browser.safari=!0),j.test(" fragment of the file. This character isn't encoded correctly by TiddlyFox while my addon handles it properly. The easiest test is to download empty TW 2.6.5, modify a tiddler, enter some unicode characters like ąę, save, and compare with non-edited empty TW 2.6.5 in encoding-aware diff tool. If both files have UTF-8 encoding, the relevant bit in jQuery doesn't differ, and your edited tiddler is correct as well, you have a confirmation that the addon works fine.
Michał