Open mauriciojxs opened 9 years ago
Thanks for raising this issue. I think json_Encode
in WebHelpers could help with this encoding. It is currently a private method, but it's come up before so I may make it public in the future to help with cases like this. In the meantime, I would recommend making json_Encode
public in your Workbook and then use that on your parameters before adding them to the url.
Great, that option worked!
Thanks.
I've been reading more about this and it looks something like json_Encode
needs to be the default, I'll fix this soon. http://stackoverflow.com/questions/912811/what-is-the-proper-way-to-url-encode-unicode-characters
Tim, take a look at the reply from Todoist support staff. Apparently, they would accept chars with accents, don't know what could have gone wrong the first time (without json_encode) https://todoist.com/Support/show/98060/ Also, I copied the Resource string and pasted in Chrome, and it work as expected.
Just FYI and/or for the record, to put bytes in a URL needs them to be URL-safe, achieved with URL-encoding. If the data is Unicode characters (which are different from bytes), it will first need converting into bytes. Probably the most widely-used way to do that is with UTF-8 encoding, though Todoist would need to confirm that's what they expect. Note Windows libraries tend to use UTF-16.
I assume that years later this problem is solved. If so, I suggest closing this issue. If not, say so and I will be pleased to make a PR to fix! (presumably on VBA-JSON)
Hi Tim,
I'm having trouble to send chars with accentuation to the TODOist API. This chars are part of the "task description", but the server doesn't recognize the command when I do so. Here is my logging:
If I create the task in TODOist website, and get it from VBA-WEB, I could tell they use Unicode (á becomes \u00E1). I tried encoding my string to unicode before adding to the url, with StrConv, but no sucess.
Is there any feature on VBA-WEB that would help me with that, or any suggestion from your side?