delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/07/21/00:09:25

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 46L49PMC1902247
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=CtEG3DHZ
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FBCA385DDC5
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1721534964;
bh=hMLAKK8kFCoITb9BlGNxXmKJmvOK76EoisgILWfuk+k=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=CtEG3DHZdqy7pSdVv/LpQ4Lx15QV/i+ZgLrmePnOrDwWK5wJJQywGaJ9RBFD+gSCA
+UA7gLzLSgCBvzuv2VQuwLyEIpdAiVQbfnZ2PCWdNYYw5rWNPqyB5OeNf7HBwdIgMf
xL1rueOcbIVSNV//YgAA/NZ+idhykIBkhgjVIs2U=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45F00385DDC5
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 45F00385DDC5
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721534942; cv=none;
b=QC4iza8ksdq2EVk0GIITQdnFLq7XGQal53wb+p3Qjtw+WpwOzHuHU4PLoGm6ZvPnV3967GO2RVkZGDRGtX55fHsabqOGdnQAShFTjCdu7PqTzqZbPMMXekStu5ZRFQ5mirQVPpbGgzIBvV55/E81Str2Ke9VOp0FmLZAdsfiews=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1721534942; c=relaxed/simple;
bh=cTljIt8K6uW2YiQkyMC3JdtkCiaw3D+QKMW6cQZjjc8=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=C9M13CU30ESIjHkWwYFRWIXTksexkfRVspX3/WANZ4Oi+QqneMS7eVGlzQDnyYznr6P2mq8FX4KJkmp+Qi9K59wVeAfTQ4EAvn/ehF6M2gWe3JfbgK92yOkbGU2IYEpHzirFLKOUG/tJcRXWvt4O1T3BlKjE1+eEvLhSAMdMCIQ=
ARC-Authentication-Results: i=1; server2.sourceware.org
Date: Sun, 21 Jul 2024 13:08:56 +0900
To: cygwin AT cygwin DOT com
Subject: Re: Parse output of "net use", but language varies - force language
for "net use"?
Message-Id: <20240721130856.be3bfb81d11bee4d06aa2392@nifty.ne.jp>
In-Reply-To: <9fdc2e3d-6cc8-489a-af54-142c1809c5ad@towo.net>
References: <CAN0SSYzW_im0Fgucbsqk6u=Cu1suSmvhJbskH8doV98mMOTtUg AT mail DOT gmail DOT com>
<20240721085457 DOT 9cf5591d8f990352a277347b AT nifty DOT ne DOT jp>
<9fdc2e3d-6cc8-489a-af54-142c1809c5ad AT towo DOT net>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On Sun, 21 Jul 2024 05:57:10 +0200
Thomas Wolff wrote:
> Am 21.07.2024 um 01:54 schrieb Takashi Yano via Cygwin:
> > On Sat, 20 Jul 2024 15:44:17 +0200
> > Mark Liam Brown wrote:
> >> I am trying to parse the output of "net use" in a bash script, but hit
> >> a roadblock:
> >> The output of "net use" changes with the language of the system
> >> (English, Danish, French, ...), so parsing becomes nearly impossible
> >>
> >> How can I force the language used by "net use" to English, even if the
> >> system default language is Danish or French?
> > Did you try
> > chcp.com 437
> That could change the character encoding, for some (older) programs, not
> the language.

You are right. However, in Japanese environment, net use command
output Japanese message on CP932 and English message on CP437.

So, I think that this might change the message language even in
Danish, French or Germany environment.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019