Ticket #1171 (closed defect: fixed)
Tweak for convertUnicodeToFileFormat()
| Reported by: | MartinBudden | Owned by: | JeremyRuston |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.6.1 |
| Component: | core | Version: | |
| Severity: | medium | Keywords: | |
| Cc: |
Description
From BramChen?:
The SaveFile?() of TiddlySaver? class would write utf8 encoded data on browsers using TiddlySaver?.jar. as it's called from javaSaveFile() with the 'UTF-8' charset parameter.
return document.appletsTiddlySaver?.saveFile(javaUrlToFilename(filePath,"UTF-8",content);
In order to speed up the saving processes and let the saved TiddlyWiki document to be *readable*, we need not convert the unicode strings to html entities for those browsers.
Therefore, the *convertUnicodeToFileFormat()* could be tweaked as below,
function convertUnicodeToFileFormat(s) {
return config.browser.isOpera
!window.netscape ? (config.browser.isIE ? convertUnicodeToHtmlEntities(s) : s) : mozConvertUnicodeToUTF8(s); } Change History
Note: See TracTickets for help on using tickets.Download in other formats:
