Skip to content

khal shows a question mark after calendar entries #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andreas-bulling opened this issue May 2, 2017 · 27 comments
Closed

khal shows a question mark after calendar entries #640

andreas-bulling opened this issue May 2, 2017 · 27 comments

Comments

@andreas-bulling
Copy link

Hi,

for some reason, khal is showing a question mark after most of the calendar events although (if I look at these events in MacOS's calendar application) I did not add any. I also noticed that German Umlaute (non-ascii) are not shown properly in khal although utf-8 otherwise works fine in the same console (iterm2) and the Umlaute are shown properly in MacOS's Calendar. Maybe related?

@geier
Copy link
Member

geier commented May 2, 2017 via email

@andreas-bulling
Copy link
Author

Thanks a lot for your quick reply. With this option it now shows a "R" behind these entries...

Which font are we supposed to use that fully supports the symbols used by khal? As I said, otherwise I don't have any problem with UTF-8 support in my terminal...

@geier
Copy link
Member

geier commented May 2, 2017 via email

@andreas-bulling
Copy link
Author

ok... Well, what about simply showing the "R" in brackets behind the title (i.e. "$title (R)") instead of this fancy (and apparently difficult to properly support) symbol?

@WhyNotHugo
Copy link
Member

Which font are we supposed to use that fully supports the symbols used by khal? As I said, otherwise I don't have any problem with UTF-8 support in my terminal.

What's the output of `echo ⟳' (you can retype this on gtk apps with ctrl+shift+u27f3)? It seems you do have problems, since this is plain utf-8.

@geier
Copy link
Member

geier commented May 3, 2017

I'm open to replacing R by (R) for the no-fancy symbols setting, but I'm actually quite fond of the unicode symbols.

@andreas-bulling
Copy link
Author

@hobarrera I am on MacOSX/iterm. If you let me know what I have to type there I am happy to test. As I said before, I didn't notice any problems with UTF-8 so far in any other software.

@WhyNotHugo
Copy link
Member

Can you copy-paste the above character? I've no idea about macOS/OS X/iterm.

You're saying you've no issues with Unicode, but this bug report seems tonne about your terminal not properly supporting Unicode on some level.

@andreas-bulling
Copy link
Author

I copied and pasted and it shows properly in my terminal

@WhyNotHugo
Copy link
Member

Huh, that's odd/curious. What's the output of each of these commands:

python -c "print('⟳')"
python -c "print('\u27f3')"
printf "⟳\n"

@andreas-bulling
Copy link
Author

andreas-bulling commented May 5, 2017

The first and third return the desired symbol, the second returns \u27f3. (Python 2.7.13, system default).

With python 3.6.1 all three return the desired symbol, i.e. seems to be a Python (version) problem.

@geier
Copy link
Member

geier commented May 5, 2017

The way we wall this in python is this python -c "print('\N{Clockwise gapped circle arrow}')", please try that as well.

Also, which version of khal and python are you using?

@andreas-bulling
Copy link
Author

python 2.7.13: \N{Clockwise gapped circle arrow}
python 3.6.1: the desired symbol

khal: 0.9.5

@antifob
Copy link

antifob commented May 16, 2017

Hi,

I find the unicode's cool, but, when disabled, the "R" can easily be confused with
the summary. I second the change for a spaced version or, better IMHO, a "(R)"
version as, in my case, it is really a font issue and I like mine too much to use another.

khal's pretty nice, btw :)

@WhyNotHugo
Copy link
Member

What confuses me is that no-one has managed to reproduce the problem by simply running print on python3 (even though they see the problem in khal), so it's unclear if it's a python problem or a khal one.

For those who see the issue, can you make sure you're not somehow running khal with python2 (python2 is unsupported, and setup.py shouldn't let you install it with python2, but just in case).

@antifob
Copy link

antifob commented May 17, 2017

Well, in my case issuing python3 -c "print('\N{Clockwise gapped circle arrow}')" prints an empty box since it is not implemented. I use Inconsolata. Also, khal is definitely running with python3 on my side.

@WhyNotHugo
Copy link
Member

@uqam-fob So, it sound to me like the font is missing the glyphs, and there's no fallback font configured? Maybe your terminal supports having a fallback font (eg: like urxvt, termite).

@antifob
Copy link

antifob commented May 17, 2017

@hobarrera You are correct, there is no fallback font.

Just to make sure that the focus is on the right thing, I added unicode_symbols = False in my configuration and I, too, think the "R", for recursive events, could be separated from the summary to increase readability.

@antifob
Copy link

antifob commented May 18, 2017

Well, I just re-read my comment in the context of the issue and created #657.

As for the issue at hand, I would consider it is installation- or font-related. I can't think of any sane way to protect against the latter. For the first, maybe @andreas-bulling can tell how he managed to install/use khal with python2.

@andreas-bulling
Copy link
Author

andreas-bulling commented May 19, 2017

@uqam-fob I simply installed it using homebrew

brew info khal khal: stable 0.9.5 (bottled), HEAD CLI calendar application. https://lostpackets.de/khal/ /usr/local/Cellar/khal/0.9.5 (1,473 files, 10.4MB) * Poured from bottle on 2017-04-29 at 13:22:18 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/khal.rb ==> Requirements Build: git ✔ Required: python3 ✔

@andreas-bulling
Copy link
Author

I just checked /usr/local/Cellar/khal/0.9.5/bin/khal:
The first line reads #!/usr/local/Cellar/khal/0.9.5/libexec/bin/python3.6, i.e. khal does seem to be run with python3 as it should be. Still the symbol is not shown properly.

@WhyNotHugo
Copy link
Member

@andreas-bulling Can you confirm that that is the khal being used running which khal.

@andreas-bulling
Copy link
Author

andreas-bulling commented Jun 17, 2017

same binary:

$ which khal
/usr/local/bin/khal
$ ls -la /usr/local/bin/khal
lrwxr-xr-x  1 user  admin  29 29 Apr 13:22 /usr/local/bin/khal -> ../Cellar/khal/0.9.5/bin/khal

@geier
Copy link
Member

geier commented Jun 19, 2017

Is there a way to contact the homebrew maintainer of khal? Perhaps they have an idea of what's going on. Or, as a last resort, open an issue at homebrew? I'm already put off by their strange nomenclature though, and this doesn't seem to list a maintainer.

@geier
Copy link
Member

geier commented Feb 26, 2018

possibly related urwid bug: urwid/urwid#286

@geier
Copy link
Member

geier commented May 10, 2018

As I now have frequent access to a Mac I can confirm that this is indeed a case of urwid/urwid#286.

@geier geier added the upstream label May 10, 2018
@geier
Copy link
Member

geier commented Apr 7, 2019

As discussed in urwid/urwid#286, this is an issue of wrongly set locale. E.g. setting the locale to LC_ALL=en_US.UTF-8 fixes the issue.

@geier geier closed this as completed Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants