diff options
author | 2016-02-14 18:01:35 -0400 | |
---|---|---|
committer | 2016-02-14 18:01:35 -0400 | |
commit | 8429fdb288d1dd2d387a8ee2e5f23c909fc7da99 (patch) | |
tree | 845133439c75765e1af846ede92c41e9dd5bf6c6 | |
parent | 32ffc4fd71743b7fcad81c4a3bf93e234e0f3c6d (diff) |
devblog
-rw-r--r-- | Database/Types.hs | 2 | ||||
-rw-r--r-- | doc/devblog/day_362__encoding_fun.mdwn | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Database/Types.hs b/Database/Types.hs index 4521bb346..bf5417dc8 100644 --- a/Database/Types.hs +++ b/Database/Types.hs @@ -66,6 +66,8 @@ derivePersistField "SInodeCache" -- it contains such characters. newtype SFilePath = SFilePath String +instance + -- Note that Read instance does not work when used in any kind of complex -- data structure. instance Read SFilePath where diff --git a/doc/devblog/day_362__encoding_fun.mdwn b/doc/devblog/day_362__encoding_fun.mdwn new file mode 100644 index 000000000..392c5745a --- /dev/null +++ b/doc/devblog/day_362__encoding_fun.mdwn @@ -0,0 +1,19 @@ +This was one of those days where I somehow end up dealing with tricky +filename encoding problems all day. + +First, worked around inability for concurrent-output to display unicode +characters when in a non-unicode locale. The normal trick that git-annex +uses doesn't work in this case. Since it only affected -J, I decided to +make git-annex detect the problem and make -J behave as if it was not built +with the concurrent-output feature. So, it just doesn't display concurrent +output, which is better than crashing with an encoding error. + +The other problem affects v6 repos only. Seems that not all Strings will +round trip through a persistent sqlite database. In particular, unicode +surrogate characters are replaced with garbage. This is really [a bug in +persistent](https://github.com/yesodweb/persistent/issues/540). +But, for git-annex's purposes, it was possible to work around it, +by detecting such Strings and serializing them differently. + +Then I had to enhance `git annex fsck` to fix up repositories that were +affected by that problem. |