Web lists-archives.com

Re: t0028-working-tree-encoding.sh test #3 data




On Sat, Mar 09, 2019 at 09:36:34AM -0500, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm experiencing a failure in t0028-working-tree-encoding.sh. The
> first failure is test #3. The source states "source (test.utf16lebom,
> considered UTF-16LE-BOM)" but it looks like a UTF16-LE BOM followed by
> a UTF32-LE stream.
>
> Am I misunderstanding the data presentation?

Thanks for the report.

I think you understand it right.

May be you can help us: Which OS are you using ?

And what does
echo "hallo" | iconv -f UTF-8 -t UTF-16 | xxd
give ?

We may need some more debugging, may be you can send the whole log file ?
Even if there is are a lot of ESC-sequences...



>
> $ ./t0028-working-tree-encoding.sh -v -i
> ...
> ok 2 - ensure UTF-8 is stored in Git
>
> expecting success:
>         test_when_finished "rm -f test.utf16.raw" &&
>
>         rm test.utf16 &&
>         git checkout test.utf16 &&
>         test_cmp_bin test.utf16.raw test.utf16
>
> Updated 1 path from the index
> source (test.utf16lebom, considered UTF-16LE-BOM):
> |  0: ff   |  1: fe   |  2: 68 h |  3:  0   |  4:  0   |  5:  0   |
> 6: 61 a |  7:  0
> |  8:  0   |  9:  0   | 10: 6c l | 11:  0   | 12:  0   | 13:  0   |
> 14: 6c l | 15:  0
> | 16:  0   | 17:  0   | 18: 6f o | 19:  0   | 20:  0   | 21:  0   |
> 22: 20   | 23:  0
> | 24:  0   | 25:  0   | 26: 74 t | 27:  0   | 28:  0   | 29:  0   |
> 30: 68 h | 31:  0
> | 32:  0   | 33:  0   | 34: 65 e | 35:  0   | 36:  0   | 37:  0   |
> 38: 72 r | 39:  0
> | 40:  0   | 41:  0   | 42: 65 e | 43:  0   | 44:  0   | 45:  0   |
> 46: 21 ! | 47:  0
> | 48:  0   | 49:  0   | 50:  a   | 51:  0   | 52:  0   | 53:  0   |
> 54: 63 c | 55:  0
> | 56:  0   | 57:  0   | 58: 61 a | 59:  0   | 60:  0   | 61:  0   |
> 62: 6e n | 63:  0
> | 64:  0   | 65:  0   | 66: 20   | 67:  0   | 68:  0   | 69:  0   |
> 70: 79 y | 71:  0
> | 72:  0   | 73:  0   | 74: 6f o | 75:  0   | 76:  0   | 77:  0   |
> 78: 75 u | 79:  0
> | 80:  0   | 81:  0   | 82: 20   | 83:  0   | 84:  0   | 85:  0   |
> 86: 72 r | 87:  0
> | 88:  0   | 89:  0   | 90: 65 e | 91:  0   | 92:  0   | 93:  0   |
> 94: 61 a | 95:  0
> | 96:  0   | 97:  0   | 98: 64 d | 99:  0   | 100:  0   | 101:  0   |
> 102: 20   | 103:  0
> | 104:  0   | 105:  0   | 106: 6d m | 107:  0   | 108:  0   | 109:  0
>  | 110: 65 e | 111:  0
> | 112:  0   | 113:  0   | 114: 3f ? | 115:  0   | 116:  0   | 117:  0
>
> destination (test.utf16lebom, considered UTF-8):
> |  0: 68 h |  1:  0   |  2: 61 a |  3:  0   |  4: 6c l |  5:  0   |
> 6: 6c l |  7:  0
> |  8: 6f o |  9:  0   | 10: 20   | 11:  0   | 12: 74 t | 13:  0   |
> 14: 68 h | 15:  0
> | 16: 65 e | 17:  0   | 18: 72 r | 19:  0   | 20: 65 e | 21:  0   |
> 22: 21 ! | 23:  0
> | 24:  a   | 25:  0   | 26: 63 c | 27:  0   | 28: 61 a | 29:  0   |
> 30: 6e n | 31:  0
> | 32: 20   | 33:  0   | 34: 79 y | 35:  0   | 36: 6f o | 37:  0   |
> 38: 75 u | 39:  0
> | 40: 20   | 41:  0   | 42: 72 r | 43:  0   | 44: 65 e | 45:  0   |
> 46: 61 a | 47:  0
> | 48: 64 d | 49:  0   | 50: 20   | 51:  0   | 52: 6d m | 53:  0   |
> 54: 65 e | 55:  0
> | 56: 3f ? | 57:  0
>
> test.utf16.raw test.utf16 differ: char 1, line 1
> not ok 3 - re-encode to UTF-16 on checkout
> #
> #               test_when_finished "rm -f test.utf16.raw" &&
> #
> #               rm test.utf16 &&
> #               git checkout test.utf16 &&
> #               test_cmp_bin test.utf16.raw test.utf16
> #