rgit icon indicating copy to clipboard operation
rgit copied to clipboard

500 on file names with non-ascii glyphs

Open nalply opened this issue 3 months ago • 5 comments

To reproduce:

Add a file non≈ascii.txt to a repository. Note the double tilde glyph in the filename, U+2248. In the tree view click on that file.

Result:

500 Internal Server Error

Path doesn't exist in tree

nalply avatar Sep 13 '25 08:09 nalply

On Sat, Sep 13, 2025 at 01:41:39AM -0700, Daniel Ly wrote:

To reproduce:

Add a file non≈ascii.txt (note the double tilde glyph in a repository, U+2248). In the tree view click on that file.

Result: 500 Internal Server Error Path doesn't exist in tree

@Daniel Please provide a git repository that is a minimal reproducer.

Regards Geert Stappers

Silence is hard to parse

stappersg avatar Sep 13 '25 10:09 stappersg

https://github.com/nalply/rgit-test.git

not quite but almost minimal, just ignore the Readme.md

nalply avatar Sep 13 '25 11:09 nalply

On Sat, Sep 13, 2025 at 04:31:54AM -0700, Daniel Ly wrote:

https://github.com/nalply/rgit-test.git

@.:~ $ cd /dev/shm/ @.:/dev/shm $ git clone https://github.com/nalply/rgit-test.git Cloning into 'rgit-test'... remote: Enumerating objects: 6, done. remote: Counting objects: 100% (6/6), done. remote: Compressing objects: 100% (4/4), done. remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0 (from 0) Receiving objects: 100% (6/6), done. @.:/dev/shm $ cd rgit-test/ @.:/dev/shm/rgit-test $ ls non≈ascii.txt README.md @.:/dev/shm/rgit-test $ ls n | od -bah 0000000 156 157 156 342 211 210 141 163 143 151 151 056 164 170 164 012 n o n b ht bs a s c i i . t x t nl 6f6e e26e 8889 7361 6963 2e69 7874 0a74 0000020 @.*:/dev/shm/rgit-test $

Regards Geert Stappers Not knowning when he encounters again non-ASCII in a filename.

Silence is hard to parse

stappersg avatar Sep 13 '25 12:09 stappersg

Sorry. I am not sure what you wanted to show me.

≈ (U+2248) in UTF-8 is the three bytes e2 89 88 which is also reported by your usage of od (just swap the two bytes). That's what I expected!

So, now, I have an idea how to procceed, and I hope it's a good idea.

Please visit the repository in rgit, like this:

Image

then click on that file with the non-ascii glyph in the name and boom:

Image

and also could you compare this behavior with what github did. Filenames with non-ascii glyphs are mostly completely fine (I know there are some really tricky problems with such files, but my example should totally work).

Really sorry if there was something what I missed completely, as I said, I am not sure. Please accept my apology in advance.

nalply avatar Sep 13 '25 14:09 nalply

On Sat, Sep 13, 2025 at 07:33:21AM -0700, Daniel Ly wrote:

Sorry. I am not sure what you wanted to show me.

Something like "a human has seen the good bugreport"

.... Really sorry if there was something what I missed completely, as I said, I am not sure. Please accept my apology in advance.

:-) No worries

And if you want to worry, just worry about "How to improve rgit?"

Regards Geert Stappers

Silence is hard to parse

stappersg avatar Sep 13 '25 15:09 stappersg

And if you want to worry, just worry about "How to improve rgit?"

https://github.com/w4/rgit/issues/194#issuecomment-3564909668

stappersg avatar Nov 24 '25 17:11 stappersg