aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/hPutChar_error_message_with_UTF-8_chars_above_7F_in_filenames.mdwn
blob: 16acb005e09f336bc328b887ac5f44934ccf5bf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
### Please describe the problem.

When using `--incremental` together with `git annex fsck`, the error 
message "hPutChar: invalid argument (invalid character)" appears in the 
"Only X of Y trustworthy copies exist" message when the filename 
contains an UTF-8 character above U+007F. The only locale in which this 
doesn't happen is "C.UTF-8".

### What steps will reproduce the problem?

- Create and add a file with an UTF-8 character in the file name above U+007F to git-annex
- Set `numcopies` high enough so `git annex fsck` will produce a warning about missing copies
- Execute `git annex fsck --incremental`

I've created two test scripts on 
<https://gist.github.com/sunny256/ebf4d055f5500b257ed8> that demonstrate 
this error:

- `git clone https://gist.github.com/ebf4d055f5500b257ed8.git`
- `cd ebf4d055f5500b257ed8`
- `./runme`

You can specify a locale to `runme` as `$1` to experiment with different 
locales.

There's also a `test-all-locales` script that executes `./runme` with 
all defined locales on the computer. Both scripts return 1 if the error 
message appears, if it's gone, 0 is returned.

### What version of git-annex are you using? On what operating system?

Newest git-annex amd64 (5.20150812) from `downloads.kitenet.net`.

### Please provide any additional information below.

The `runme` script contains more information about this issue.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log

Here are two excerpts of the test output using the "C" and 
"C.UTF-8" locale:

$ ./runme C
[snip]
================== git annex --incremental fsck ==================
fsck U00D8_Ø.txt (checksum...)

  Only 1 of 2 trustworthy copies exist of U00D8_
git-annex: <stderr>: hPutChar: invalid argument (invalid character)
failed
fsck ascii_only.txt (checksum...)

  Only 1 of 2 trustworthy copies exist of ascii_only.txt
  Back it up with git-annex copy.
failed
(recording state in git...)
git-annex: fsck: 2 failed

$ ./runme C.UTF-8
[snip]
================== git annex --incremental fsck ==================
fsck U00D8_Ø.txt (checksum...)

  Only 1 of 2 trustworthy copies exist of U00D8_Ø.txt
  Back it up with git-annex copy.
failed
fsck ascii_only.txt (checksum...)

  Only 1 of 2 trustworthy copies exist of ascii_only.txt
  Back it up with git-annex copy.
failed
(recording state in git...)
git-annex: fsck: 2 failed

# End of transcript or log.
"""]]

> [[fixed|done]] --[[Joey]]