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

Export track with name that contains Cyrillic symbols #404

Closed
korzhyk opened this issue May 5, 2021 · 3 comments
Closed

Export track with name that contains Cyrillic symbols #404

korzhyk opened this issue May 5, 2021 · 3 comments
Milestone

Comments

@korzhyk
Copy link

korzhyk commented May 5, 2021

Hello everyone,

I several times faced with problem when try to export track and always downloading file with name like - 40km.gpx. I see an warning about filename sanitization regex, but also I know about there some problems with Cyrillic in RegEx due to use a lot of unicode range.
Also I find the line that this regex must be in sync with server one.

// regex needs to be in sync with server, see ServerHandler.getTrackName()
BR.conf.tracknameAllowedChars = 'a-zA-Z0-9 \\._\\-';

So what is the best way to resolve this issue?

Can we just add some unicode space in regex, ex.: https://regexr.com/5s97r

@rkflx
Copy link
Contributor

rkflx commented May 5, 2021

Hi,

thanks for your report. The way filenames are handled has changed recently, see 7aa2fcb (change not deployed to production yet, though). We now rely on the browser to remove restricted characters from the filename, which should finally allow sensible filenames beyond ASCII again, not only for Cyrillic.

I got a chance to perform some tests with an Edge 810 last week, will add more comments later. Feel free to test with your devices/apps too, in particular of interest would be:

  • Which device/app are you using?
  • Use trackname with unicode characters you'd like to use: Does it crash your device/app when importing the GPX? Is everything displayed correctly?
  • Rename file to use unicode characters in filename: Can you copy the file from where you saved it to the target device? Is it listed there? Does it crash when importing?

See also #194, #202, #269.

@korzhyk
Copy link
Author

korzhyk commented May 5, 2021

Hello,

I just got feedback from my «bicycle» friends, they using a lot of garmin, wahoo, lezyne and bryton. And only Bryton has issues with special/cyrillic characters in filename.

As for me, I'm using Lezyne with official mobile app and no any issues with cyrillic wasn't found.

@nrenner
Copy link
Owner

nrenner commented Aug 10, 2022

Should now be supported by client-side formatting (#399) and download (7aa2fcb) and is already online.

The RegEx is no longer in use for that, as now the browser takes care of both the filename and proper encoding for XML and JSON.

@nrenner nrenner closed this as completed Aug 10, 2022
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

3 participants