- bookr = new wxHtmlBookRecord(bookfile.GetLocation(), fsys.GetPath(), title, deftopic);
+ wxString title1 = title;
+ if (encoding != wxFONTENCODING_SYSTEM)
+ {
+ wxCSConv conv(encoding);
+ CORRECT_STR(title1, conv);
+ if (title1.IsEmpty() && !title.IsEmpty())
+ title1 = title;
+ }
+
+ bookr = new wxHtmlBookRecord(bookfile.GetLocation(), fsys.GetPath(), title1, deftopic);