Search code examples
phpshellzipunzip

Shell - Unzip folder with accent


I created a ".zip" in Windows with this structure :

myfile.zip
    - trénsfèst
        - file1.png
        - file2.png
        - file3.png

With PHP I send a shell_exec to put myfile.zip on my server. And in my shell file I need to unzip this file to get the structure in a specific folder. When I executed unzip myfile.zip all the accent have are not interpreted :

Archive:  myfile.zip
creating: tr?n'sf?rt/
inflating: tr?n'sf?rt/file1.png
inflating: tr?n'sf?rt/file2.png
inflating: tr?n'sf?rt/file3.png

When I try to remove the folder there is some squares in replacement of the accents. Is there a solution to unzip my folder with all the accents

Thanks


Solution

  • Thanks Ruslan Osmanov but I found a solution. After unzip my zip file I use convmv so here is my process :

    unzip myfile.zip
    convmv --notest -r -f WINDOWS-1252 -t utf8
    

    Thank to this post : Windows-1252 to UTF-8 encoding