da8e84efe9
QuickCheck 2.10 found a counterexample eg "\929184" broke the property. As far as I can tell, Git.Filename is matching how git handles encoding of strange high unicode characters in filenames for display. Git does not display high unicode characters, and instead displays the C-style escaped form of each byte. This is ambiguous, but since git is not unicode aware, it doesn't need to roundtrip parse it. So, making Git.FileName's roundtrip test only chars < 256 seems fine. Utility.Format.format uses encode_c, in order to mimic git, so that's ok. Utility.Format.gen uses decode_c, but only so that stuff like "\n" in the format string is handled. If the format string contains C-style octal escapes, they will be converted to ascii characters, and not combined into unicode characters, but that should not be a problem. If the user wants unicode characters, they can include them in the format string, without escaping them. Finally, decode_c is used by Utility.Gpg.secretKeys, because gpg --with-colons hex-escapes some characters in particular ':' and '\\'. gpg passes unicode through, so this use of decode_c is not a problem. This commit was sponsored by Henrik Riomar on Patreon. |
||
---|---|---|
.. | ||
DirWatcher | ||
LockFile | ||
LockPool | ||
Process | ||
Scheduled | ||
Touch | ||
Applicative.hs | ||
AuthToken.hs | ||
Base64.hs | ||
Batch.hs | ||
Bloom.hs | ||
CoProcess.hs | ||
CopyFile.hs | ||
Daemon.hs | ||
Data.hs | ||
DataUnits.hs | ||
DBus.hs | ||
Directory.hs | ||
DirWatcher.hs | ||
DiskFree.hs | ||
Dot.hs | ||
DottedVersion.hs | ||
Env.hs | ||
Exception.hs | ||
ExternalSHA.hs | ||
FileMode.hs | ||
FileSize.hs | ||
FileSystemEncoding.hs | ||
Format.hs | ||
FreeDesktop.hs | ||
Glob.hs | ||
Gpg.hs | ||
Hash.hs | ||
HumanNumber.hs | ||
HumanTime.hs | ||
InodeCache.hs | ||
libkqueue.c | ||
libkqueue.h | ||
LinuxMkLibs.hs | ||
LockFile.hs | ||
LockPool.hs | ||
LogFile.hs | ||
Lsof.hs | ||
MagicWormhole.hs | ||
Matcher.hs | ||
Metered.hs | ||
Misc.hs | ||
Monad.hs | ||
Mounts.hs | ||
Network.hs | ||
NotificationBroadcaster.hs | ||
OptParse.hs | ||
OSX.hs | ||
Parallel.hs | ||
PartialPrelude.hs | ||
Path.hs | ||
Percentage.hs | ||
PID.hs | ||
PosixFiles.hs | ||
Process.hs | ||
QuickCheck.hs | ||
Quvi.hs | ||
Rsync.hs | ||
SafeCommand.hs | ||
Scheduled.hs | ||
Shell.hs | ||
SimpleProtocol.hs | ||
Split.hs | ||
SRV.hs | ||
SshConfig.hs | ||
Su.hs | ||
SystemDirectory.hs | ||
Tense.hs | ||
ThreadLock.hs | ||
ThreadScheduler.hs | ||
TList.hs | ||
Tmp.hs | ||
Tor.hs | ||
Touch.hs | ||
Tuple.hs | ||
Url.hs | ||
UserInfo.hs | ||
Verifiable.hs | ||
WebApp.hs | ||
WinProcess.hs | ||
Yesod.hs |