Giter VIP home page Giter VIP logo

Comments (15)

wader avatar wader commented on August 28, 2024

Hi, thanks for the report. I wonder if this is somehow related to #2961

Did it work correctly in previous versions? would be great if you could try 1.7 and 1.6

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

@wader, 1.7rc-2 has no such bug, but it's already present in 1.7.

from jq.

wader avatar wader commented on August 28, 2024

@sergeevabc Ok thanks, that is very useful

Changes jq-1.7rc2...jq-1.7

This commit sticks out 11c528d

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

@wader, I'm ready to test x64 windows binary without that commit if you compile and attach it to your next message right here (as .zip since Github does not allow .exe)

from jq.

wader avatar wader commented on August 28, 2024

Thanks for the offer. We probably still want to call setlocale to support localised date formats etc. So i think me or someone else has to get a proper windows development setup to be able to look into this.

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

@wader, also I believe it's better from UX standpoint to omit paths when displaying the manual, because paths in this case, sometimes quite long,1 create a distracting noise and make it hard to read on small (e.g. laptop) screens.

Examples without paths

$ 7z.exe
7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] [@listfile]

$ age.exe
Usage:
    age [--encrypt] (-r RECIPIENT | -R PATH)... [--armor] [-o OUTPUT] [INPUT]
    age [--encrypt] --passphrase [--armor] [-o OUTPUT] [INPUT]
    age --decrypt [-i PATH]... [-o OUTPUT] [INPUT]

$ aria2c.exe
Specify at least one URL.
Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE] ...

$ ffmpeg.exe
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile} ...

$ magick.exe
Usage: magick.exe [ {option} | {image} ... ] {output_image}

$ rustic.exe
rustic - fast, encrypted, deduplicated backups powered by Rust
Usage: rustic.exe [OPTIONS] <COMMAND>

$ xxhsum.exe
xxhsum.exe 0.8.2 by Yann Collet
Print or verify checksums using fast non-cryptographic algorithm xxHash
Usage: xxhsum.exe [options] [files] ...

Footnotes

  1. Compare jq.exe and C:\Resources\Software\Portable\Console\jq.exe mentioned multiple times.

from jq.

wader avatar wader commented on August 28, 2024

Hmm that is also a bit strange. It uses argv[0] for the program name which usually i think is up to the program running the command (the shell in this case) to provide as argument zero. Feels like there is some indirection going on? for me on macOS it print this.

$ jq
jq - commandline JSON processor [version 1.7]

Usage:	jq [options] <jq filter> [file...]
	jq [options] --args <jq filter> [strings...]
	jq [options] --jsonargs <jq filter> [JSON_TEXTS...]

....

$ /opt/homebrew/bin/jq
jq - commandline JSON processor [version 1.7]

Usage:	/opt/homebrew/bin/jq [options] <jq filter> [file...]
	/opt/homebrew/bin/jq [options] --args <jq filter> [strings...]
	/opt/homebrew/bin/jq [options] --jsonargs <jq filter> [JSON_TEXTS...]
....

Same with older versions?

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

@wader, that annoying thing related to displaying the manual with full paths exists in JQ for Windows since day one, at least it is true for 8 releases between 1.7.1 and 1.3.

from jq.

nicowilliams avatar nicowilliams commented on August 28, 2024

jq only supports UTF-8 input and output, which means that on Windows you must use the UTF-8 code page.

from jq.

nicowilliams avatar nicowilliams commented on August 28, 2024

image

chcp 65001 did make it work for me (this is on Windows 11).

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

@nicowilliams, you've checked another part of JQ output, not the one I reported.

Do the following to reproduce:

  • Start -> Run -> cmd.exe
  • Type C:\Проверка\jq-win64.exe and execute (mind the folder part)

2024-0117-0458 jq 171 chcp 65001

from jq.

nicowilliams avatar nicowilliams commented on August 28, 2024

Ah, OK, I see it.

from jq.

nicowilliams avatar nicowilliams commented on August 28, 2024

Maybe we need to SetConsoleMode() earlier?

from jq.

wader avatar wader commented on August 28, 2024

As i'm hopeless encoding nerd i follow the #utf8 tag on mastodon and happen to see this https://fosstodon.org/@[email protected]/111810376715194784 the linked commit looks a bit interesting

from jq.

sergeevabc avatar sergeevabc commented on August 28, 2024

Err… Hello?

from jq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.