rejetto forum

Author Topic: Кирилица в названии файлов и папок при скачивании .tar  (Read 10084 times)

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 910
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
I just got answer from WinRaR tech support.

Last years tar archives tend to use UTF-8 encoding for file names.

WinRAR, beginning from version 5.40, attempts to use UTF-8 for tar first. If conversion from UTF-8 fails, WinRAR switches to ANSI encoding, which is CP1251 for Russian.

As far as I know, 7-Zip also attempts to use UTF-8 for tar first.
If conversion from UTF-8 fails, 7-Zip switches to OEM encoding, which is CP866 for Russian.

There is no reliable way to detect the file name encoding in TAR, so both WinRAR and 7-Zip just take a wild guess. This time the archive was in CP866 encoding, so 7-Zip guess was correct. In case of ANSI encoding WinRAR guess would be correct. Both would be correct for UTF-8 encoding.

Beginning from WinRAR 5.40 it is possible to override the code page selected by WinRAR and specify another code page. Open this archive in WinRAR first, then open "Options/Name encoding" WinRAR menu and select "866 (OEM - Russian)". Then browse or unpack the archive.
This name encoding menu is not available in WinRAR 5.20.


that is correct, by default when a tar is made it attempts to use the system language and turns files into a zip archive thus the encoding is utf-8

quote: "Actually tar doesn't encode/decode filenames at all, It simply copies them out of the filesystem as-is. If your locale is UTF-8-based"
http://superuser.com/questions/60379/how-can-i-create-a-zip-tgz-in-linux-such-that-windows-has-proper-filenames


i'm not sure how hfs sends it commands to tar, but in linux, it is possible to tar and change the encoding
http://www.howtogeek.com/248780/how-to-compress-and-extract-files-using-the-tar-command-on-linux/

in you case you want a different encoding:
http://community.sharpdevelop.net/forums/p/10702/29494.aspx

with 7zip (possible winrar) you would have to open the comand line (cmd/terminal) and run it with certain comand to extract the files you want...
https://sevenzip.osdn.jp/chm/cmdline/syntax.htm
http://community.sharpdevelop.net/forums/p/10702/29494.aspx

?Maybe it can be scripted?...
Files I have snagged and share can be found on my google drive:

https://drive.google.com/drive/folders/1qb4INX2pzsjmMT06YEIQk9Nv5jMu33tC?usp=sharing

Follow members gave a thank to your post:


Thank-o-Matic 3.0 By Adk Team