Heyuri / kokonotsuba

Heyuri's BBS software
Other
19 stars 12 forks source link

Japanese characters in the filename #10

Closed kaguy4 closed 1 week ago

kaguy4 commented 1 year ago

If a filename is all Japanese characters, it shows the UNIX timestamp the post is being submitted instead of the filename. If it's starting with Japanese characters followed by all alphanumeric characters, it only shows the alphanumeric part It properly shows the filename with Japanese characters only if they are at the middle/end (in other words, it shows the proper filename only if it is starting with an alphanumeric character)

I gave the examples with Japanese characters, but there are probably other characters that break the filename in the same way too.

shimeji87 commented 1 year ago

is it the code itself renaming the files, or the OS?

JeffSabol commented 1 year ago

I noticed the filename (fname) in the database is empty when there are Japanese characters in the filename

kaguy4 commented 1 week ago

If anyone coming from the future has this issue, do this: https://www.graalvm.org/latest/reference-manual/ruby/UTF8Locale/