#1134843 whois: Forcibly adding charset flag can break queries with incompatible whois flags

Package:
whois
Source:
whois
Description:
intelligent WHOIS client
Submitter:
Phillip Baker
Date:
2026-06-05 07:47:01 UTC
Severity:
normal
Tags:
#1134843#5
Date:
2026-04-24 23:47:32 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
	Attempted to run a whois query against a RIPE object with --list-versions specified
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
	whois --list-versions AS25098
   * What was the outcome of this action?
	%ERROR:109: invalid combination of flags passed
	%
	% The flags "--list-versions" and "-Z, --charset" cannot be used together.

	Rerunning whois with --verbose, it is observed that the whois client silently adds --charset UTF-8 for whois.ripe.net, and there appears to be no way to prevent this being added.

	whois actually submits a query string of;
	Query string: "-V Md5.6.3 --list-versions --charset UTF-8 AS25098"

	Reportbug suggested I try v5.6.6 from testing, but looking at the current source code, this additional flag to request UTF-8 output is still specified in servers_charset_list and I can't see any way to suppress this behaviour, so I don't think using 5.6.6 will help.

	This behaviour will break queries for any whois server where both
	1 - a character set flag is specified in servers_charset_list
	2 - specifying a character set is incompatible with one or more of the user-supplied flag(s)

	Somewhat related, as I imagine it flows from the decision to hard code charset (not that I diagree with targeting UTF-8 wherever possible of course), but it is not possible for a user to specify a /different/ --charset if they wanted to for .. some reason .. as whois itself flatly rejects --charset as an unknown flag as it is not in the list of longopts

   * What outcome did you expect instead?
	1 - whois to either have the ability to suppress (and maybe also override) the "default extra" character set flags by some way - either an opt to suppress the charset flag being added and/or the ability to submit a "query string literal" (smallest code changes, most compatible for any future changes to whois servers), or
	2 - to suppress --charset where a known-incompatible flag is specified (requires much more maintenance to track incompatibilities and quite a lot more code effort)

	so that, either way, I could ultimately submit a query string exactly like

	Query string: "-V Md5.6.3 --list-versions AS25098"

#1134843#10
Date:
2026-06-05 07:44:25 UTC
From:
To:
RIPE NCC will implement support for this in the server in the next few
weeks, so I will not change the client behaviour.