Using Multi-byte filename

Permalink
Yamanoi-san from Usagi Project
http://www.concrete5.org/profile/-/4812/...


He suggest the following. So that we can use multi-byte filename in concrete5.

We can start from here....

Japanese Windows users are using SHIFT-JIS character code for filename in Japanese.

So he gave us the example to alter the encoding of Shift_JIS if the users are using Internet Explorer.

The rest of users will use UTF-8 encoding...

I'm sure there may be more issue with other languages.... but there are many demands from Japanese people that they want to upload the file with Japanese filename.

This is the DIFF of /concrete/helpers/file.php.

http://usagi-project.org/redmine/repositories/diff/concrete5/5.3.3/...


Thanks

katz515
 
Remo replied on at Permalink Reply
Remo
sure, why not but isn't it possible to use mb_detect_encoding to check whether a string is actually encoded as SJIS?

I'm not sure how the http header looks if someone sends a SJIS request but having a more dynamic solution would be important imho.

There's probably not only SJIS and we should think about that too. I also would like to see this optional, use a constant or something. I like having non-ascii stuff stripped from my file names...
katz515 replied on at Permalink Reply
katz515
I think I talked with you about this before, Remo...

Personally, I rarely use Japanese for file name.
And I don't think I won't be using non-ascii characters for filename. It's just too risky.

But around when Wikipedia started letting people to use the multi-bytes character URI, the more people started thinking that we can use multi-byte characters for file name and URL even though these are meant for web.

The people developed UTF-8 for this reason. So eventually, I think we must support multi-byte file name, and eventually URI.

I've heard from the people over dozens times that they want us to support Japanese file name...

So I cannot really stop their trends.
Remo replied on at Permalink Reply
Remo
I don't want to stop them, I understand what they are looking for.

I just like to make sure it works automatically or optionally by setting a constant in the config file..

This would help us to make sure we only have one trunk and the japanese distribution is not completely different from the official c5 version.