Skip to content
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

Cannot use non-ascii chars in workout title #647

Open
maciejla opened this issue Oct 29, 2024 · 4 comments
Open

Cannot use non-ascii chars in workout title #647

maciejla opened this issue Oct 29, 2024 · 4 comments

Comments

@maciejla
Copy link

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
Copy link
Owner

SamR1 commented Oct 30, 2024

Hi,

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

@maciejla
Copy link
Author

maciejla commented Nov 4, 2024

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 :(

@SamR1
Copy link
Owner

SamR1 commented Nov 9, 2024

Hi,

Thanks for the detailed answer.

For the moment, I have not been able to reproduce the issue.
I tried with a fresh install on Docker (without any changes, by default LANG value is C.UTF-8):

root@031dec1ccebb:/usr/src/app# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@031dec1ccebb:/usr/src/app# locale
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

I was able to add non-ASCII characters in workout title:
image
No problem either with a gpx file containing non-ASCII characters in the title.

The error occurs on upload or workout edition?

@maciejla
Copy link
Author

The error occurs on both upload and edition. I will reinstall FitTrackee on a clean LXC and try to reproduce the error :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants