Invalid UTF-8 Sequence in Subversion Again

I remembered I encountered this issue before few months back in March. But yet, I can't remember how to solve it. My previous solution to detect the culprit filename with invalid encoding was using strace but this post recommended a better, more accurate approach to detect it. The detection is straight forward, just convert the hexadecimal code to ASCII.

Let's look at my previous example
$ svn up

svn: Valid UTF-8 data
(hex: 49 50 )
followed by invalid UTF-8 sequence
(hex: a0 2d 56 69)

My issue last time I did not fully grok the error message. What the svn client tried to tell me is there is a filename in hexadecimal sequence of 49 50 a0 2d 56 69 that is causing the corruption.

Convert this hexadecimal sequence to ASCII and the full culprit filename known as shown below.
$ echo "\x49\x50\xa0\x2d\x56\x69" | xargs -0 printf

What you can do right now is find any file that contains this sequence of characters of IP�-Vi and remove it.
$ ls IP�-Vi*
$ rm -rf IP�-Vi*

Whoala ! There you have it.

No comments:

Post a Comment