Open larstvei opened 7 years ago
I had the same issue to (with umlauts). Is it possible that the reason for this is that in org-gcal--json-read
the encoding in utf-8
is enforced? According to https://stackoverflow.com/questions/8872493/setting-file-encoding-for-org-mode-ical-export (didn't look for the original source) Google expects cp1252
I get lots of encoding errors on my sync'd calendars, where it asks me to choose the encoding to save files as and replace symbols that aren't in it. Is this similar to what's experienced here?
My report (russian utf-8): First, it correctly imports the data available in the calendar, however, if I make changes - add синхронизация
word to title, for example, the last ones are displayed as A8=E@>=870F8O
(in google calendar interface too)
So we should patch this part of the code to fix the encoding ?
https://github.com/myuhe/org-gcal.el/blob/master/org-gcal.el#L627
Wouldn't google be happy if we add something like "charset=utf-8" in the Content-Type header ?
https://github.com/myuhe/org-gcal.el/blob/master/org-gcal.el#L626
Adding charset=utf-8
still removes e.g. æ
, ø
and å
for me. This however, seems to keep them..
(defun org-gcal--post-event (start end smry loc desc &optional id a-token skip-import skip-export)
(let ((stime (org-gcal--param-date start))
(etime (org-gcal--param-date end))
(stime-alt (org-gcal--param-date-alt start))
(etime-alt (org-gcal--param-date-alt end))
(a-token (if a-token
a-token
(org-gcal--get-access-token))))
(request
(concat
(format org-gcal-events-url (car (car org-gcal-file-alist)))
(when id
(concat "/" id)))
:type (if id "PATCH" "POST")
- :headers '(("Content-Type" . "application/json"))
+ :headers '(("Content-Type" . "application/json;charset=cp1252"))
Still does not work for arbitrary unicode, like e.g. emojis. They sync ok from gcal, but does fetch correctly after posting
It seems no UTF-8 encoding has done before posting json data, and this should be the reason of corrupted unicode characters.
See #108
Hi everyone! This repository is obsolete - the actively developed fork is now https://github.com/kidd/org-gcal.el, which is also the "org-gcal.el" on MELPA (see #115). I'm one of the maintainers of https://github.com/kidd/org-gcal.el. I can't directly close issues or PRs on this repo, but please download https://github.com/kidd/org-gcal.el and see if your issue or PR is still applicable. If so, open an issue or PR on https://github.com/kidd/org-gcal.el. In any case, you should close your issue or PR in this repo.
Hi! Thanks for this very cool package!
It seems like non-ASCII characters are ignored when syncing with google calendar.
If I place the following text in the org file I synchronise with google calendar:
Then it is replaced by the following after synchronisation:
Notice that the
å
have been removed.I will try to look into it, but if you could point me in the right direction, that would be great!