- const wxChar wdata[] = { 0x00A3, 0x00A3, 0x00A3, 0x00A3, 0 }; // pound signs
- const char *utf7 = "+AKM-+AKM-+AKM-+AKM-";
- wxString str(wdata);
+ static const StringConversionData utf7data[] =
+ {
+ { "+-", L"+" },
+ { "+--", L"+-" },
+ { "+AKM-", L"\u00a3" },
+
+ // Windows accepts invalid UTF-7 strings and so does our UTF-7
+ // conversion code -- this is wrong IMO but the way it is for now
+ //
+ // notice that converting "+" still behaves as expected because the
+ // result is just an empty string, i.e. the same as if there were an
+ // error, but converting "a+" results in "a" while it really should
+ // fail
+ { "+", NULL },
+ { "a+", L"a" },
+ };