pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.58k stars 200 forks source link

UTF-8 calendar names not displayed correctly #649

Open epilys opened 7 years ago

epilys commented 7 years ago

I have a calendar with a greek title, and both in khal printcalendars and in the event editor in ikhal I see a blank space instead of the name. Greek event titles appear correctly.

In the debug logs, I see

Found no or empty file `displayname`

for the greek calendar. And in the config print I get:

debug: Using config:                                                              
debug: [calendars]                                                     
debug:   [[]]
debug: ....

I have metadata = ["displayname", "color"] in vdirsyncer config but the displayname file doesn't get created. Creating a displayname file in the calendar's vdir shows the calendar name. But I have other calendars in ascii with no displayname files and khal deduces their name from the path correctly (I think).

andreas-bulling commented 7 years ago

maybe related to #640?

epilys commented 7 years ago

No, it isn't related.

geier commented 7 years ago

can you show the part of your config file that deals with that calendar?

epilys commented 7 years ago

khal:

[[Προσωπικό]]
path = ~/.calendars/Προσωπικό/
type = discover

[locale]
local_timezone = Europe/Athens
default_timezone = Europe/Athens
timeformat = %H:%M
dateformat = %Y-%m-%d
longdateformat = %Y-%m-%d
datetimeformat = %Y-%m-%d %H:%M
longdatetimeformat = %Y-%m-%d %H:%M

vdirsyncer:

[pair nextcloud_cal]
a = "nextcal_local"
b = "nextcal_remote"
collections = ["from a", "from b"]
metadata = ["displayname", "color"]

[storage nextcal_local]
type = "filesystem"
path = "~/.calendars/"
fileext = ".ics"
encoding = "utf-8"

[storage nextcal_remote]
type = "caldav"
url = --NEXTCLOUD URL--
WhyNotHugo commented 7 years ago

Can you make sure khal is using a supported python version? The output of these should be enough:

head -n 1 $(which khal)
A="$(head -n 1 $(which khal))" && echo $(which ${A:15})
A="$(head -n 1 $(which khal))" && eval ${A:2} --version
epilys commented 7 years ago

It's Python 3.6.0.

Can you reproduce this on your end?

geier commented 7 years ago

No, I can't reproduce this on my end:

% cat ~/.config/khal/config
[calendars]
[[Προσωπικό]]
path = ~/.local/share/khal/calendars/Προσωπικό/*
type = discover
% khal printcalendars
σωπικό
work
privat
test
% ls ~/.local/share/khal/calendars/Προσωπικό/
σωπικό/       home/         test/         work/
% cat ~/.local/share/khal/calendars/Προσωπικό/σωπικό/displayname
cat: /home/cg/.local/share/khal/calendars/Προσωπικό/σωπικό/displayname: No such file or directory

(calendar home has a displayname set to private)

What version of python and khal are you using? What OS and how are those filenames encoded? I have tested this with python 3.4.6 on FreeBSD 11.0 with utf-8.

geier commented 7 years ago

any news on this?

epilys commented 7 years ago

Sorry, I've lost the config and don't use khal very much lately. But even on your own output the name isn't parsed correctly (khal printcalendars gives 'σωπικό' instead of 'Προσωπικό')

I was using OpenBSD 6.0 and Python 3.4 and the then master branch.