1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-26 09:28:07 +02:00

Bug 2714 - (Japanese & Korean) "Unable to parse project information"

This commit is contained in:
Leland Lucius 2021-03-25 00:19:11 -05:00
parent 95a7fc6362
commit ffebbe064e
2 changed files with 6 additions and 3 deletions

View File

@ -1755,7 +1755,7 @@ bool ProjectFileIO::LoadProject(const FilePath &fileName, bool ignoreAutosave)
XMLFileReader xmlFile; XMLFileReader xmlFile;
// Load 'er up // Load 'er up
success = xmlFile.ParseString(this, project.ToUTF8()); success = xmlFile.ParseString(this, project);
if (!success) if (!success)
{ {
SetError( SetError(

View File

@ -135,8 +135,9 @@ bool XMLFileReader::Parse(XMLTagHandler *baseHandler,
bool XMLFileReader::ParseString(XMLTagHandler *baseHandler, bool XMLFileReader::ParseString(XMLTagHandler *baseHandler,
const wxString &xmldata) const wxString &xmldata)
{ {
const char *buffer = xmldata.mb_str().data(); auto utf8 = xmldata.ToUTF8();
int len = xmldata.mbc_str().length(); const char *buffer = utf8.data();
int len = utf8.length();
mBaseHandler = baseHandler; mBaseHandler = baseHandler;
@ -156,6 +157,8 @@ bool XMLFileReader::ParseString(XMLTagHandler *baseHandler,
(long unsigned int)XML_GetCurrentLineNumber(mParser) (long unsigned int)XML_GetCurrentLineNumber(mParser)
); );
wxLogMessage(wxT("ParseString error: %s\n===begin===%s\n===end==="), mErrorStr.Debug(), buffer);
return false; return false;
} }