There is a known problem that special characters are not displayed
correctly if included from external files by the MasterIncludesPlugin.

http://groups.google.com.au/group/TiddlyWiki/browse_thread/thread/bf4cf4ee32ba196e/0a1d7adb4fc93775?hl=en&lnk=gst&q=MIP+unicode#0a1d7adb4fc93775

For use with Firefox, I fixed this by converting to UTF-8 in the
mozillaLoadFile function (see bottom of post for the patch).

I did notice that a similar patch has been proposed in the past:
http://groups.google.com.au/group/TiddlyWikiDev/browse_thread/thread/26bdef5429626fb/9442b81914834670?hl=en&lnk=gst&q=unicode+#9442b81914834670

If this patch can't be applied to the core, I can easily massage it
for placement in the MIP.

Is the reason for not applying it to the core still relevant today?

Thanks,
Michael



Index: core/js/FileSystem.js
===================================================================
--- core/js/FileSystem.js       (revision 8308)
+++ core/js/FileSystem.js       (working copy)
@@ -247,7 +247,9 @@
                        inputStream.init(file,0x01,00004,null);
                        var sInputStream = Components.classes["@mozilla.org/
scriptableinputstream;1"].createInstance
(Components.interfaces.nsIScriptableInputStream);
                        sInputStream.init(inputStream);
-                       var contents = 
sInputStream.read(sInputStream.available());
+            var unicodeConverter = Components.classes["@mozilla.org/
intl/scriptableunicodeconverter"].createInstance
(Components.interfaces.nsIScriptableUnicodeConverter);
+            unicodeConverter.charset = "UTF-8";
+            var contents = unicodeConverter.ConvertToUnicode
(sInputStream.read(sInputStream.available()));
                        sInputStream.close();
                        inputStream.close();
                        return contents;:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to