Allow embedded double quotes, and hex-encode single quotes. Makes the
typical case a bit more readable. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -641,7 +641,7 @@ static wxString FileToPythonArray(wxString filename, int num)
|
||||
size_t lng = file.Length();
|
||||
|
||||
snum.Printf(_T("%i"), num);
|
||||
output = _T(" xml_res_file_") + snum + _T(" = \"\"\"\\\n");
|
||||
output = _T(" xml_res_file_") + snum + _T(" = '''\\\n");
|
||||
|
||||
unsigned char *buffer = new unsigned char[lng];
|
||||
file.Read(buffer, lng);
|
||||
@@ -654,7 +654,7 @@ static wxString FileToPythonArray(wxString filename, int num)
|
||||
tmp = (wxChar)c;
|
||||
linelng = 0;
|
||||
}
|
||||
else if (c < 32 || c > 127 || c == '"')
|
||||
else if (c < 32 || c > 127 || c == '\'')
|
||||
tmp.Printf(_T("\\x%02x"), c);
|
||||
else if (c == '\\')
|
||||
tmp = _T("\\\\");
|
||||
@@ -671,7 +671,7 @@ static wxString FileToPythonArray(wxString filename, int num)
|
||||
|
||||
delete[] buffer;
|
||||
|
||||
output += _T("\"\"\"\n\n");
|
||||
output += _T("'''\n\n");
|
||||
|
||||
return output;
|
||||
}
|
||||
|
Reference in New Issue
Block a user