SamR1 / FitTrackee

Self-hosted outdoor activity tracker :bicyclist:
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
717 stars 44 forks source link

Cannot use non-ascii chars in workout title #647

Open maciejla opened 6 days ago

maciejla commented 6 days ago

Hi, I'm creating the issue because it seems like only ASCII characters are accepted in the workout title field :( the error I got is:

2024/10/29 17:00:24 - fittrackee - ERROR - 'ascii' codec can't encode character '\u0144' in position 4: ordinal not in range(128)

It would be awesome if you could support all unicode characters :)

SamR1 commented 5 days ago

Hi,

The issue may be related to system encoding or locale. Is the locale a non-UTF-8 locale?

maciejla commented 9 hours ago

Hi, unfortunately I don't think that's the issue. The OS is Debian 12 on LXC with the configuration as close to default as possible, so the locale was set to C:

root@fittrackee:~# cat /etc/default/locale 
LANG="C"

I changed that to en_US.UTF-8:

root@fittrackee:~# nano /etc/default/locale
root@fittrackee:~# nano /etc/locale.gen
root@fittrackee:~# locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
root@fittrackee:~# reboot

after reboot:

root@fittrackee:~# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

however, the error still exists :(