From 673593f91179ee4189f856d82e2e5db1c7ee1a98 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Dec 2021 21:47:26 +0100 Subject: [PATCH] Document that wxString passed to AddFile() must use Latin-1 Otherwise To8BitData() would return an empty buffer for it. --- interface/wx/fs_mem.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/wx/fs_mem.h b/interface/wx/fs_mem.h index 546ced5b2b..6b3af9b911 100644 --- a/interface/wx/fs_mem.h +++ b/interface/wx/fs_mem.h @@ -83,6 +83,10 @@ public: Stored data (bitmap, text or raw data) will be copied into private memory stream and available under name @c "memory:" + @e filename. + When using the overload taking @c wxString data, the string must + contain only Latin-1 characters (which includes strings created using + wxString::From8BitData()). + @note you must use a @a type value (aka image format) that wxWidgets can save (e.g. JPG, PNG, see wxImage documentation)!