500 on file names with non-ascii glyphs
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
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
https://github.com/nalply/rgit-test.git
not quite but almost minimal, just ignore the Readme.md
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
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:
then click on that file with the non-ascii glyph in the name and boom:
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.
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
And if you want to worry, just worry about "How to improve
rgit?"
https://github.com/w4/rgit/issues/194#issuecomment-3564909668