init: Change fallback locale to C.UTF-8 #17085

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2019_10_utf8_fallback changing 1 files +2 −2
  1. laanwj commented at 12:56 pm on October 9, 2019: member

    Much of our code assumes file system UTF-8 support, and this is a more realistic guess for modern systems anyway than the default character set (which would be ASCII only). So change the assumed fallback locale (if no locale is defined by the user or OS) to C.UTF-8.

    related: #14948 (comment)

  2. init: Change fallback locale to C.UTF-8
    Much of our code assumes UTF-8 support, and this is a more realistic
    guess for modern systems anyway than the default character set (which
    would be ASCII only). So change the assumed fallback locale (if no
    locale is defined by the user or OS) to `C.UTF-8`.
    facb9a1315
  3. laanwj added the label Utils/log/libs on Oct 9, 2019
  4. carnhofdaki commented at 1:02 pm on October 9, 2019: contributor
    Tested ACK
  5. laanwj added the label Linux/Unix on Oct 9, 2019
  6. MarcoFalke commented at 1:17 pm on October 9, 2019: member
    Is there a way to test this or observe a difference?
  7. laanwj commented at 1:21 pm on October 9, 2019: member
    I think this triggers if you unset all locale environment settings, or set them to invalid values. Then try to create a unicode-named file (e.g. what the fsbridge tests do).
  8. carnhofdaki commented at 1:55 pm on October 9, 2019: contributor

    Is there a way to test this or observe a difference? @MarcoFalke Sure. At least on ARM.

  9. carnhofdaki commented at 2:07 pm on October 9, 2019: contributor

    @MarcoFalke Actually even on x86_64:

    0#!/bin/sh
    1export LC_ALL=aoeunthauut
    2test/test_bitcoin
    

    … until the line in tests/fs_tests.cpp is changed according to #14948 (comment)

  10. laanwj commented at 2:12 pm on October 9, 2019: member
    Yes, processor architecture shouldn’t make a difference here. Though OS and C library differences might.
  11. MarcoFalke commented at 7:20 pm on October 9, 2019: member
    0(before) $ LC_ALL=foobar ./src/test/test_bitcoin -t fs_tests 
    1Running 1 test case...
    2unknown location(0): fatal error: in "fs_tests/fsbridge_fstream": boost::system::system_error: boost::filesystem::path codecvt to string: error
    3test/fs_tests.cpp(13): last checkpoint: "fsbridge_fstream" test entry
    4*** 1 failure is detected in the test module "Bitcoin Core Test Suite"
    5
    6(after)  $ LC_ALL=foobar ./src/test/test_bitcoin -t fs_tests
    7Running 1 test case...
    8*** No errors detected
    

    ACK facb9a1315f97489a20eb0e969fdb14b5128ed2f

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3ACK facb9a1315f97489a20eb0e969fdb14b5128ed2f
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUh+Vwv+PZx+VMlRL0aTqVNzWW4JIBSvwP9ocYvJikKafvOB2hqzJbOYq2bH/aks
     8LRXOBaPiawal/M7oSzZ5QNAtJSkYVrGb9Oxin+niBXLQILkmkX3EVTWWgVynrjmp
     9i1/2rprmnlcKAKrNW9/kcjXKhVAfBq5akQ1HuoAGCb4RDuI33kEbuiX9rOWFVkKO
    10+F8px5DfwKHotlkWdX9243eI1p8RllCNLUR2bct7YrGf5y9YLMsO7Y6NjBoFzC6h
    11TzTTFm2ME80OkHKvy7DksLMK8VFXqY9JiWrGbnP6CyP7K4iw2DMVGY/AUxFkWagU
    12NL5wboCZtCmdlcB8F8kFOoUaxElyPYWWXOxpa9IGL3+PZ7Yk6hr4MmFcI7N+0ktL
    13ZayzrqQKiiczMxqljhniWJeo1ha994F8VgxSgcEAgygRT7goQOOaERULs2k2OI6S
    14JvnOJvy1ymRGgMFLxH3D+nsZ7qLiNpwFmxV7vy86kRcDtsdQiRl3pKZ1C0mNVVNy
    154w7beEqg
    16=0+w3
    17-----END PGP SIGNATURE-----
    

    Timestamp of file with hash 90206a870662404d82581bfdbe4e04c973ddb2b8bef3edfde3660cce6e32cb35 -

  12. laanwj referenced this in commit b67ca4ee73 on Oct 10, 2019
  13. laanwj merged this on Oct 10, 2019
  14. laanwj closed this on Oct 10, 2019

  15. laanwj added the label Needs backport (0.19) on Oct 10, 2019
  16. MarcoFalke added this to the milestone 0.19.0 on Oct 12, 2019
  17. fanquake referenced this in commit ba46f39418 on Oct 19, 2019
  18. fanquake removed the label Needs backport (0.19) on Oct 19, 2019
  19. laanwj referenced this in commit 5b68d1654f on Oct 21, 2019
  20. HashUnlimited referenced this in commit a075715a07 on Nov 17, 2019
  21. fxtc referenced this in commit bfcd5d96f9 on Nov 25, 2019
  22. fxtc referenced this in commit e237e70739 on Nov 25, 2019
  23. Fabcien referenced this in commit d7795abdf9 on Dec 24, 2020
  24. PastaPastaPasta referenced this in commit 0f4d2e319c on Jun 27, 2021
  25. PastaPastaPasta referenced this in commit 7fb3cd6dc6 on Jun 28, 2021
  26. PastaPastaPasta referenced this in commit 0fd173db05 on Jun 29, 2021
  27. PastaPastaPasta referenced this in commit bfc1b562c1 on Jul 1, 2021
  28. PastaPastaPasta referenced this in commit 45405955a7 on Jul 1, 2021
  29. UdjinM6 referenced this in commit fe49674f2f on Jul 5, 2021
  30. PastaPastaPasta referenced this in commit eb1eb9d9ab on Jul 12, 2021
  31. PastaPastaPasta referenced this in commit 37ebcb1e90 on Jul 13, 2021
  32. PastaPastaPasta referenced this in commit e4457ce2ef on Jul 13, 2021
  33. Munkybooty referenced this in commit 6ce7e306b1 on Dec 9, 2021
  34. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me