SVN Error: Can't convert string from native encoding to 'UTF-8'

前端 未结 11 1006
花落未央
花落未央 2020-12-13 06:29

I\'ve got a post-commit hook script that performs a SVN update of a working copy when commits are made to the repository.

When users commit to the repository from th

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 06:46

    If Error is -

    [abc@288832-web3 public_html]$ svn update
    svn: Error converting entry in directory 'images' to UTF-8
    svn: Valid UTF-8 data
    (hex: 46 65 6e 65 72 62 61 68)
    followed by invalid UTF-8 sequence
    (hex: e7 65 2b 46)
    

    Then do this.

    [abc@288832-web3 public_html]$ printf "\x46\x65\x6e\x65\x72\x62\x61\x68\n"
    Fenerbah  
    

    (This means that the system has some file name starting with "Fenerbah" in that folder.)

    [abc@288832-web3 public_html]$ cd  images
    [abc@288832-web3 images]$ rm -rf Fenerbahçe+Forma+2.jpg
    

    So you can see that there is a special character in the name and it is not supported by SVN.

提交回复
热议问题