]> git.ipfire.org Git - thirdparty/git.git/commit
convert: add round trip check based on 'core.checkRoundtripEncoding'
authorLars Schneider <larsxschneider@gmail.com>
Sun, 15 Apr 2018 18:16:10 +0000 (20:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Apr 2018 02:40:56 +0000 (11:40 +0900)
commite92d6225361eba5ff34696122d1491dc7ace2a5a
treedcb3ac5d5b153ce1052c139c52cacfc4a0706b0e
parent541d059cd903bb8e510f876ea2bc33719b76b33c
convert: add round trip check based on 'core.checkRoundtripEncoding'

UTF supports lossless conversion round tripping and conversions between
UTF and other encodings are mostly round trip safe as Unicode aims to be
a superset of all other character encodings. However, certain encodings
(e.g. SHIFT-JIS) are known to have round trip issues [1].

Add 'core.checkRoundtripEncoding', which contains a comma separated
list of encodings, to define for what encodings Git should check the
conversion round trip if they are used in the 'working-tree-encoding'
attribute.

Set SHIFT-JIS as default value for 'core.checkRoundtripEncoding'.

[1] https://support.microsoft.com/en-us/help/170559/prb-conversion-problem-between-shift-jis-and-unicode

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
Documentation/gitattributes.txt
config.c
convert.c
convert.h
environment.c
t/t0028-working-tree-encoding.sh