radusuciu / traktor_nowplaying

A cross-platform library and command-line tool that extracts the currently playing track in Traktor and optionally outputs to a file with configurable formatting.
MIT License
57 stars 8 forks source link

Fixed unicode characters outputting issue #3

Closed WernerBureau closed 3 years ago

WernerBureau commented 3 years ago

This change works on my computer when trying to output foreign characters to a text file.

Setting those environment variables can also help fixing local exceptions on your machine if your Windows command-line throws you an exception as well. set PYTHONIOENCODING=utf-8 set PYTHONLEGACYWINDOWSSTDIO=utf-8

radusuciu commented 3 years ago

Hey fyi, thank you for this and I apologize for not looking at yet - I've just had no time for side projects, and would just like to test on my machine before accepting.

WernerBureau commented 3 years ago

Yeah no problem, take your time! I just did the fix for myself and figured I'd do a PR on here just because I saw someone else had the same issue :)

radusuciu commented 3 years ago

Hi, fixed with https://github.com/radusuciu/traktor_nowplaying/commit/e0a8ccb68ad2e60f0ddc0dada142c4df1a9248d8, I opted to not use io since I'm not targeting or testing python2. Thank you very much though!