1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-08 09:36:24 +01:00

Allow Unicode filenames via mod-script-pipe commands

This commit is contained in:
James Crook
2018-11-11 13:55:14 +00:00
parent d9b5129e64
commit a18680647d

View File

@@ -154,7 +154,11 @@ size_t currentPosition;
// The response lines can be retrieved by calling DoSrvMore repeatedly. // The response lines can be retrieved by calling DoSrvMore repeatedly.
int DoSrv(char *pIn) int DoSrv(char *pIn)
{ {
wxString Str1(pIn, wxConvISO8859_1); // Interpret string as unicode.
// wxWidgets (now) uses unicode internally.
// Scripts must send unicode strings (if going beyond 7-bit ASCII).
// Important for filenames in commands.
wxString Str1(pIn, wxConvUTF8);
Str1.Replace( wxT("\r"), wxT("")); Str1.Replace( wxT("\r"), wxT(""));
Str1.Replace( wxT("\n"), wxT("")); Str1.Replace( wxT("\n"), wxT(""));
Str2 = wxEmptyString; Str2 = wxEmptyString;