开发者

Script for correcting linux filenames on windows and vice versa?

As far as I know, Unix-like systems use UTF-8 for encoding filenames, while Windows system use their own Windows single-byte encodings.

I am working with archives with japanese filenames in them quite oftenly. When I open开发者_如何学C such archive created in Windows, japanese letters are dead, because filename encoding is incorrect.

Same thing happens, when I create archive in my Linux and then someone opens it under Windows.

So, I have thought that this should be quite common problem, and, because filenames are recoverable there must already exist correcting .sh script for linux and .bat script for Windows.

But after googling for quite a long time I still have not found anything. Is there such scripts at all? If not, what difficultuies may have stopped people from creating them?

Update I would be happy with a solution that works for most Linux systems and most Windows systems.


Windows uses the two byte encoding UTF-16. Your problem is most likely that you are using single byte ANSI versions of whatever archive tool you are using.

Until you give more details of the code and tools you are using it's hard to give specific advice. However, the are no limitations on using the full range of Unicode characters in modern Windows file systems.


Thank you for your input. Case indeed looks quite complex for simple bash script, I'll need to use programming language.

I don't see anything like "close question" button, so I'll use this answer to do so.


Take a look to convmv tool available for Unix systems

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜