From nobody Fri Feb 03 10:06:42 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7WV95dwFz2nR92 for ; Fri, 3 Feb 2023 10:04:49 +0000 (UTC) (envelope-from eivinde@terraplane.org) Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3006::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7WV86b1lz3KGb for ; Fri, 3 Feb 2023 10:04:48 +0000 (UTC) (envelope-from eivinde@terraplane.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=terraplane.org header.s=ds202212 header.b="O9+nt/FQ"; spf=pass (mx1.freebsd.org: domain of eivinde@terraplane.org designates 2a01:5b40:0:3006::1 as permitted sender) smtp.mailfrom=eivinde@terraplane.org; dmarc=pass (policy=none) header.from=terraplane.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=terraplane.org; s=ds202212; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2TNCKqo9QG65nmELbo/KNiCsQ2YOaP9YU8QtlDN97pw=; b=O9+nt/FQf+eThL4NGahmxng/XH zqM4kGpd+1lWTK1riMymMsftlyfVVUnAvl0jKF5BN8tK76ZnqaY9K/Qqwn+Ufv5AEXBFTML3e2l3P dYFbsUKH6D79PVSKYQYc697iiIAbDWo3ls0KwItoXxfS0Ag5y1OVOJ3sVe6cYxgJ1LMF0fOCMo+Eh lu8q+Bp0t0arQgdNzdEyUQ/PDqmzHTmGwsff2y5fuM4Ic3uVPaizOMm6OKlbcKojh9kH3wCaW5t7Q UJGeAOCP/7kE6bXl28xiUVKyE7dZPla/Yb+fLJjrHm1Ca+fN94ytHanGuxZkShawJdualyFxKvPrS 3W9dOMGQ==; Received: from ti0027q160-0136.bb.online.no ([37.200.21.137]:11894 helo=elg.hjerdalen.lokalnett) by smtp.domeneshop.no with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pNsvv-001EMk-Vr for freebsd-stable@freebsd.org; Fri, 03 Feb 2023 11:04:40 +0100 Date: Fri, 3 Feb 2023 11:06:42 +0100 From: Eivind Nicolay Evensen To: freebsd-stable@freebsd.org Subject: Grep with non-ascii Message-ID: <20230203110642.70e4a076@elg.hjerdalen.lokalnett> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[terraplane.org,none]; R_SPF_ALLOW(-0.20)[+ip6:2a01:5b40:0:2000::/51]; R_DKIM_ALLOW(-0.20)[terraplane.org:s=ds202212]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:12996, ipnet:2a01:5b40::/48, country:NO]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[terraplane.org:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4P7WV86b1lz3KGb X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello. I just noticed this today: elg!ene[~]> printf "bø\nhei\nøl\n" | grep ø grep: trailing backslash (\) elg!ene[~]> echo $LC_CTYPE $LANG nb_NO.ISO8859-1 nb_NO.ISO8859-1 While I have the result I envisioned with gnugrep: elg!ene[~]> printf "bø\nhei\nøl\n" | ggrep ø bø øl Also, on OpenIndiana, linux and Netbsd, grep gives the proper result. Is lib/libc/regex the right place to look into this if I find the time, or does anybody know this enough to know the problem? Regards -- Eivind Nicolay Evensen