Bug #4448
closedzfs diff misprints unicode characters
100%
Description
Sorry if my explanation is confusing--character sets have never been by strong suit...
It seems that unicode characters are displayed incorrectly in zfs diff
output:
[root@smarty ~]# touch /opt/abcdéfg.txt [root@smarty ~]# zfs diff -HF zones/opt@snapshot M / /opt/ + F /opt/abcd\\37777777703\\37777777651fg.txt
\\37777777703\\37777777651
appears to be an octal-escaped equivalent of hex bytes 0xc3 0xa9
, which in turn represents 'é' in UTF-8.
Instead, I would expect to see \\303\\251
as the proper octal-escaped equivalent.
A similar issue was reported and fixed here: https://github.com/zfsonlinux/zfs/issues/1172.
For reference, I'm running a SmartOS build from 20131128T230213Z.
Related issues
Updated by Joshua M. Clulow over 6 years ago
- Subject changed from 'zfs diff' misprints unicode characters to zfs diff misprints unicode characters
Updated by Joshua M. Clulow over 6 years ago
The cause is sign extension of the (signed) char
as it is passed to fprintf()
as a vararg argument. I believe these are always at least int
or larger.
Updated by Joshua M. Clulow over 6 years ago
- Assignee set to Joshua M. Clulow
- Tags deleted (
needs-triage)
Updated by Electric Monk over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit b211eb9181f99c20acbf4c528f94cb44b4ca8c31
commit b211eb9181f99c20acbf4c528f94cb44b4ca8c31 Author: Joshua M. Clulow <jmc@joyent.com> Date: 2016-01-30T01:54:34.000Z 4448 zfs diff misprints unicode characters Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Matthew Ahrens <mahrens@delphix.com>
Updated by Yuri Pankov over 6 years ago
- Related to Feature #6479: ZFS Diff Prints Carriage Returns added