utils: Convert Windows args to utf-8 string #13883

pull ken2812221 wants to merge 1 commits into bitcoin:master from ken2812221:windows-command-line-args changing 6 files +62 −1
  1. ken2812221 commented at 5:40 pm on August 5, 2018: contributor
    Create a new class WinCmdLineArgs when building for Windows. It converts all command line arguments to utf8 string.
  2. DrahtBot commented at 6:58 pm on August 5, 2018: member
    • #13746 (-masterdatadir for datadir bootstrapping by kallewoof)
    • #10102 ([experimental] Multiprocess bitcoin by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. ken2812221 force-pushed on Aug 6, 2018
  4. laanwj added the label Windows on Aug 6, 2018
  5. alexeyneu commented at 11:04 am on August 13, 2018: none

    no-bowler
    https://imageshack.com/a/img922/8836/nesafY.jpg

    0	std::wstring h;
    1	h=GetCommandLineW();
    2
    3	std::wcout << h;
    

    it’s for wwinmain UPD: it’s smth else here . works only after setlocale(LC_ALL, "Portuguese_Portugal.1252"); with main/wmain no matter (?) upd2:

    0_setmode(_fileno(stdout), _O_U16TEXT);
    1std::wcout << L"curaçao";
    

    seems to be only way. Will be handy when verbose log dubbed to stdout .not sure if btc wallet has this option but monero has smth like that

  6. ken2812221 force-pushed on Aug 24, 2018
  7. ken2812221 force-pushed on Aug 31, 2018
  8. in src/bitcoin-cli.cpp:18 in 2ba9e15918 outdated
    14@@ -15,6 +15,7 @@
    15 #include <util.h>
    16 #include <utilstrencodings.h>
    17 
    18+#include <tuple>
    


    practicalswift commented at 7:29 am on September 11, 2018:
    0src/bitcoin-cli.cpp:18:1: warning: #includes are not sorted properly [llvm-include-order]
    
  9. ken2812221 force-pushed on Sep 11, 2018
  10. ken2812221 force-pushed on Sep 11, 2018
  11. MarcoFalke commented at 1:30 pm on September 11, 2018: member
    1e23b1cba1645b50570e1b4ca4f2da03e000f732 is adding a binary file. Is that wanted?
  12. ken2812221 force-pushed on Sep 11, 2018
  13. ken2812221 commented at 1:35 pm on September 11, 2018: contributor
    @MarcoFalke Sorry, forgot to delete that
  14. in src/bitcoin-cli.cpp:19 in 83a94cedeb outdated
    15@@ -16,6 +16,7 @@
    16 #include <utilstrencodings.h>
    17 
    18 #include <memory>
    19+#include <tuple>
    


    practicalswift commented at 8:28 pm on September 13, 2018:

    Minor nit:

    02018-09-13 21:33:38 clang-tidy(pr=13883): src/bitcoin-cli.cpp:18:1: warning: #includes are not sorted properly [llvm-include-order]
    

    ken2812221 commented at 11:50 am on September 14, 2018:
    Would you prefer to put tuple after stdio.h? I think we should seperate C and C++ headers.

    practicalswift commented at 4:06 pm on September 14, 2018:
    I don’t think we separate C and C++ headers elsewhere, but please sort them.
  15. in src/util.cpp:1290 in 83a94cedeb outdated
    1285+std::pair<int, char**> WinCmdLineArgs::get()
    1286+{
    1287+    return std::make_pair(argc, argv);
    1288+}
    1289+#endif
    1290+}
    


    practicalswift commented at 4:07 pm on September 14, 2018:
    02018-09-13 21:33:38 clang-tidy(pr=13883): src/util.cpp:1290:2: warning: namespace 'util' not terminated with a closing comment [google-readability-namespace-comments]
    
  16. ken2812221 force-pushed on Sep 14, 2018
  17. ken2812221 force-pushed on Sep 27, 2018
  18. ken2812221 force-pushed on Sep 27, 2018
  19. ken2812221 force-pushed on Sep 28, 2018
  20. ken2812221 renamed this:
    utils: Convert Windows args to utf-8 string
    [WIP] utils: Convert Windows args to utf-8 string
    on Sep 28, 2018
  21. ken2812221 force-pushed on Sep 28, 2018
  22. ken2812221 force-pushed on Sep 28, 2018
  23. ken2812221 force-pushed on Sep 28, 2018
  24. ken2812221 force-pushed on Sep 28, 2018
  25. ken2812221 renamed this:
    [WIP] utils: Convert Windows args to utf-8 string
    utils: Convert Windows args to utf-8 string
    on Sep 28, 2018
  26. NicolasDorier commented at 5:35 am on September 30, 2018: contributor
    Can you add a python test on this? You can probably highjack https://github.com/bitcoin/bitcoin/blob/78dae8caccd82cfbfd76557f1fb7d7557c7b5edb/test/functional/feature_uacomment.py by trying to set a chinese char.
  27. utils: Convert Windows args to utf-8 string 380c843217
  28. ken2812221 force-pushed on Sep 30, 2018
  29. MarcoFalke added the label Utils/log/libs on Oct 1, 2018
  30. MarcoFalke commented at 1:12 am on October 1, 2018: member
    Concept ACK 380c843217139b180457889699c65b37ae3b4a87 (Only checked that this should only affect Windows. Didn’t review nor checked that the tests fail without this fix on windows.)
  31. NicolasDorier commented at 8:18 am on October 1, 2018: contributor
    tACK 380c843217139b180457889699c65b37ae3b4a87 . The test is breaking without the fix.
  32. MarcoFalke added this to the milestone 0.18.0 on Oct 1, 2018
  33. MarcoFalke referenced this in commit 60a61611f6 on Oct 8, 2018
  34. MarcoFalke merged this on Oct 8, 2018
  35. MarcoFalke closed this on Oct 8, 2018

  36. ken2812221 deleted the branch on Oct 8, 2018
  37. Warrows referenced this in commit 5564148aed on Oct 14, 2019
  38. Warrows referenced this in commit 4bdace7e3e on Nov 23, 2019
  39. random-zebra referenced this in commit 61a098a775 on Aug 5, 2021
  40. MarcoFalke locked this on Sep 8, 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-07-01 13:12 UTC

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