public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Christian Franke <Christian.Franke@t-online.de>, cygwin@cygwin.com
Subject: Re: resolv.conf and gnupg2
Date: Fri, 19 Aug 2022 12:13:44 +0300	[thread overview]
Message-ID: <73763715.20220819121344@yandex.ru> (raw)
In-Reply-To: <3480b0f8-7b7e-6672-ce8a-ec675eb909a8@t-online.de>

Greetings, Christian Franke!

> Andrey Repin wrote:
>> Greetings, Christian Franke!
>>
>> ...
>>> Unfortunately the ipconfig output is always localized, so this does only
>>> work OOTB with English versions of Windows. The ipconfig parsing is also broken due to two reasons:
>>> - The current Cygwin versions of awk, grep and sed no longer convert CR/LF
>>> -> LF on stdin, so '/FooBar$/' patterns never match.
>>> - ipconfig may output scoped IPv6 addresses ("fe80::1%12") which are not matched by the awk script.
>>> A draft patch is attached. It also avoids the tmp file and uses shell builtins where possible.
>> Why not use netsh with `chcp 65001`?

> How would netsh help?

> Netsh is also localized and changing the codepage does possibly not change
> the output language. Changing the language would also require
> '.../en-US/netsh.exe.mui' file which is not necessarily installed.

netsh with console CP set to 65001 switching to English.

> If netsh is run interactively, it prints a deprecation warning for
> 'interface' and other commands and recommends usage of powershell.

You are not going to run it interactively, so not really a problem.
And netsh output is much more parsing friendly.


-- 
With best regards,
Andrey Repin
Friday, August 19, 2022 12:11:11

Sorry for my terrible english...


      reply	other threads:[~2022-08-19  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  6:17 Brian Inglis
2022-08-09 12:58 ` Christian Franke
2022-08-09 14:51   ` Lee
2022-08-09 16:07     ` Christian Franke
2022-08-10 14:40   ` Andrey Repin
2022-08-11 13:36     ` Christian Franke
2022-08-19  9:13       ` Andrey Repin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73763715.20220819121344@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=Christian.Franke@t-online.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).