Originally Posted by user_none
You're misunderstanding how the QString::fromUtf8 function works. Internally a QString is utf16. ::fromUtf8 takes a utf8 string and converts it into a utf16 string (all QStrings are utf16). Very little assumes or requires utf8 in regard to the text. PCRE included in 0.5.x was utf8 only. With 0.6.0 PCRE has added support for utf16 and Sigil is using it. Spell check does use uft8 but spell check is not required and does not prevent a utf16 document to be loaded or saved.
Thanks for the clarification on QString::fromUtf8. But a built from scratch Sigil ePub does
currently only contain utf-8 xhtml files, right? I know windows-1252 gets converted to utf-8 when you add/import... and I've never been able to get a utf-16 html file to add/import properly (in 0.5.3 or the 0.6 betas), so I figured it was a safe assumption that the code would only be encountering utf-8 at that point. But I guess that doesn't take into account non-Sigil built ePubs that may already
contain utf-16 files, does it?