abrochard / emacs-habitica

Emacs Extension for Habitica
GNU General Public License v3.0
76 stars 23 forks source link

Cannot add the item containing Unicode characters to checklist #30

Open bohonghuang opened 2 years ago

bohonghuang commented 2 years ago

After typingM-x habitica-add-item-to-checklist and entering "UTF-8 Test", I got following error messages in *Messages* buffer:

url-http-create-request: Multibyte text in HTTP request: POST /api/v3/tasks/69893d8f-3425-435f-b95a-d62c7706085d/checklist/ HTTP/1.1
MIME-Version: 1.0
Connection: keep-alive
Extension: Security/Digest Security/SSL
Host: habitica.com
Accept-encoding: gzip
Accept: */*
User-Agent: URL/Emacs Emacs/29.0.50 (PureGTK; x86_64-pc-linux-gnu)
Cookie: connect:sess.sig=XXXXXXXXX; connect:sess=XXXXXXXXXXX
Content-Type: application/x-www-form-urlencoded
x-api-user: ...
x-api-key: ...
Content-length: 15

text=UTF-8 Test
abrochard commented 2 years ago

Thanks for reporting this! I just edited your message to hide the cookie content. Probably not stuff you should be posting on public internet to be safe. As to the problem itself, we might need to tweak the encoding before sending the payload.

bohonghuang commented 2 years ago

Thanks for reporting this! I just edited your message to hide the cookie content. Probably not stuff you should be posting on public internet to be safe. As to the problem itself, we might need to tweak the encoding before sending the payload.

Oh I just forgot it. Thanks for the reminder and your effort to address this issue.