Unicode Madness Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
User avatar
doublemax
Moderator
Moderator
Posts: 13725
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Unicode Madness

Post by doublemax » Fri Jul 12, 2019 9:48 am

If I use it on a wxJSONValue, written to wxString (multiline) it crashes the app unfortunately. Maybe this doesnt work with String in String, as the json format needs it?
I'd need more information to be sure, but the resulting string contains '%' characters, if you use it for printf-like functions, these will be interpreted as format identifiers. In a debug build, you should get an assert in that case, not a plain crash.
Even though I would still like to know, which raw format the unescaped utf8 string has, that wxWidgets produces
I'm not sure what you mean, there is nothing special wxWidgets' UTF8 encoding.
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3318
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Unicode Madness

Post by ONEEYEMAN » Fri Jul 12, 2019 2:05 pm

Hi,
Natulux wrote:
Fri Jul 12, 2019 9:11 am
evstevemd wrote:
Thu Jul 11, 2019 12:27 pm
What happens if you send using wxHttp and libcurl?
IIRC, wxHTTP is not able to send https, so unfortunately this is no option for me.
What about {wx}cURL?

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2218
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: Unicode Madness

Post by evstevemd » Sat Jul 13, 2019 5:26 am

Natulux wrote:
Fri Jul 12, 2019 9:11 am
IIRC, wxHTTP is not able to send https, so unfortunately this is no option for me.
You are right. There was this PR to add https but was never merged and don't know why.
Natulux wrote:
Fri Jul 12, 2019 9:11 am
Thanks for that. Even though I dont understand why the formatting of your function works, this does produce the right string format. :-)
If I use it on a wxJSONValue, written to wxString (multiline) it crashes the app unfortunately. Maybe this doesnt work with String in String, as the json format needs it?
I dunno about wxJSONValue but iy you think it is library issue try wxSimpleJSON
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

Post Reply