From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: dired-do-find-regexp failure with latin-1 encoding Date: Sun, 29 Nov 2020 02:49:25 +0200 Message-ID: <42ba5cae-e0d7-afd1-9974-62e7ee5840c6@yandex.ru> References: <87blfhjr4q.fsf@gmx.net> <83k0u5mjvf.fsf@gnu.org> <877dq5jp51.fsf@gmx.net> <83im9pmh0v.fsf@gnu.org> <106736d6-1732-3f24-15c5-af7bcfd688c6@yandex.ru> <83blfhmdho.fsf@gnu.org> <247a8edb-7b70-ad32-1ba1-43b5458a82b0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26260"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: stephen.berman@gmx.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 29 01:50:22 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjAv0-0006j1-JS for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Nov 2020 01:50:22 +0100 Original-Received: from localhost ([::1]:59648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjAuz-00033S-Hx for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Nov 2020 19:50:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjAuC-0002bQ-MV for emacs-devel@gnu.org; Sat, 28 Nov 2020 19:49:32 -0500 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:33914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjAuA-00035r-Md; Sat, 28 Nov 2020 19:49:32 -0500 Original-Received: by mail-ej1-x636.google.com with SMTP id o9so13523842ejg.1; Sat, 28 Nov 2020 16:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sl0zeKUtmO/z/Qx1WsRjGTTXEdaJlT8nSmTEn0rlUjI=; b=Svxon3DNDoPjeVLMJZ540VJxWO+HCUbJkkvl6fQodQxQeCsnFnKBPMA+RmUTxDS2Vc 66v8jJYx9N/26EesiL+gM8A09aWoivmPYOnZO6PQ9TTKr3QhVTgBn0MP5izrV0QHI8HM lUAJTRVnj9QaQ798H+AB6r/ar4/6zcso/bwJFt7O0siM4i3i68rZslL103LFYK6Y7zEc 1jIAP7B95DEM4PiPaIzndslMN+by5SCfL0v3nDGofFR7p18/uPv4SzF2Dx3OBm1D83Kw L+48Y7NFM6nwV6frUY/ZCpWTpa4csevJxH7bmxxQcSqUmOAexpBfT74E/SbR6BNH+h0l e0Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sl0zeKUtmO/z/Qx1WsRjGTTXEdaJlT8nSmTEn0rlUjI=; b=Mat32DMdtrPhgQrBgoAF6XeHB04JtEGvmBeb6eNyjKrKt4zVkj0IYrmkpWOa1g0qpU RQfzw98YvorSpr1ZXrN5FFp6gfoDgJ/F8kLxVgHg4jdMUbW7g9N7b9ojmbmU7NKT6uBt V5HoTwRSnxbpYonb6qi/RlZCNof5zu8OJuGnN64OfNf/USVwi7xPc22I67itEVgCmriZ rWs2DuOLQy0Z3SAKyYGYXQLNr/vuB+GSIdDoxzkJLAlLisrPMcuVIT3Nj/4+fdsMq0vZ iQQC5n5b+Ih/ERIX2e/WKSc6ntndL/17tJJ5rfSaPrFXixXd24GQohAWRReobQajpFt0 p6sA== X-Gm-Message-State: AOAM533V108cuCAYeP1+xOpc/v1GjVvmnvmJjOyra1Eqax7/5gw1E7rb RPGrmm0N3Soq7JoNV+DeOenUZVrgItfrxA== X-Google-Smtp-Source: ABdhPJwmmvk4f664JKEmTuaAyHAHUnztMqmndR0bJTmauqyYe/Sn+n0Q7zLGhat5v05nX96Syqtlfw== X-Received: by 2002:a17:906:591a:: with SMTP id h26mr8101563ejq.174.1606610968449; Sat, 28 Nov 2020 16:49:28 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id l19sm2346809edq.14.2020.11.28.16.49.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Nov 2020 16:49:27 -0800 (PST) In-Reply-To: <247a8edb-7b70-ad32-1ba1-43b5458a82b0@yandex.ru> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=raaahh@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259983 Archived-At: On 28.11.2020 23:04, Dmitry Gutov wrote: > or latin-1 (AND the current system locale matches that encoding), the > search should work fine across such files in different encodings, and > without 'C-x RET c' Correction: only utf-8 and utf-16 detection is automatic. latin-1 needs explicit arguments '-E latin-1' passed to rg. The official recommended workaround is to use a --pre flag which is similar to what Stephen did originally by inserting 'iconv ...' in the shell command string: https://github.com/BurntSushi/ripgrep/issues/746 I suppose if we really wanted, we could insert some custom program that chooses what to 'iconv' with, but that would be slower, of course. But it could work with Grep, too.