rclone: Can't add UTF-8 characters to alias names

Hello, Happy we have rclone backend drives -o config gdrive: for list all shared drive for config file, but my shared drive have utf-8 char, and with large folder with char “" very hard to read. To much char "” to very confuse,

I have > 1000 shared drive, so it very confuse, hope a people help do that folder rclone support utf-8 very great

image

Thank you very much

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Space end character had been fixed, and work good 😃, Thank @ncw @albertony

@albertony can you think of a reason why we shouldn’t allow UTF-8 characters in alias names?

I would suggest we use allow unicode character class L and N for letter and number.

This would change this regexp

https://github.com/rclone/rclone/blob/beea4d5119555c0424cf3bc8b3e67d625813b014/fs/fspath/path.go#L16

Into something like

configNameRe = `[\p{L}\p{N}_. -]+`

This is the first time I’ve used unicode character classes so I’m not 100% sure that is correct. We’d need to fix the google drive backend also where it cleans these characters from alias names it creates for the combine backend.

@vulieumang could you cut and paste some of the original names here so I can check that regexp would work please? Thanks

Here are the unicode character class names for reference

Unicode character class names general category
C other
Cc control
Cf format
Cn unassigned code points (NOT SUPPORTED)
Co private use
Cs surrogate
L letter
LC cased letter (NOT SUPPORTED)
L& cased letter (NOT SUPPORTED)
Ll lowercase letter
Lm modifier letter
Lo other letter
Lt titlecase letter
Lu uppercase letter
M mark
Mc spacing mark
Me enclosing mark
Mn non-spacing mark
N number
Nd decimal number
Nl letter number
No other number
P punctuation
Pc connector punctuation
Pd dash punctuation
Pe close punctuation
Pf final punctuation
Pi initial punctuation
Po other punctuation
Ps open punctuation
S symbol
Sc currency symbol
Sk modifier symbol
Sm math symbol
So other symbol
Z separator
Zl line separator
Zp paragraph separator
Zs space separator

This is a request to add UTF-8 characters into the names of aliases. Currently we only support a-z0-9 but there is no reason we shouldn’t use UTF-8 characters in aliases.

I’ll re-open this so we can think about the consequences of the change.