From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Fixing Gnus, and string encoding question Date: Fri, 05 Apr 2019 19:22:18 -0700 Message-ID: <87zhp3swit.fsf@ericabrahamsen.net> References: <87d0m0qivv.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="90180"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 06 04:23:00 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCayy-000NMQ-DW for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2019 04:23:00 +0200 Original-Received: from localhost ([127.0.0.1]:49521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCayx-0005BF-61 for ged-emacs-devel@m.gmane.org; Fri, 05 Apr 2019 22:22:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCayN-0005AB-4T for emacs-devel@gnu.org; Fri, 05 Apr 2019 22:22:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hCayM-0001nW-0S for emacs-devel@gnu.org; Fri, 05 Apr 2019 22:22:23 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:46440 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hCayL-0001mv-9I for emacs-devel@gnu.org; Fri, 05 Apr 2019 22:22:21 -0400 Original-Received: from localhost (97-113-50-252.tukw.qwest.net [97.113.50.252]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 13B6DFA05C; Sat, 6 Apr 2019 02:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ericabrahamsen.net; s=mail; t=1554517340; bh=UiaZuZZEeM8ZUQJyqomFaQGGlVs01+KjPu4D6DJR0kE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ObrrZQ2rJibCyiGZBBmSQQh8RKvKhrPYZVNN8HuJdf/F7m4Gb7fPPJX1z5jNWjH2h 0t/YAaSoMg+vxKiBWcbh0EknztRNh6lrUsENsyhbJETnkt7ldE1CKeAtvVvqc8d7Yy Bme8YDMARg4BZmlihvkb0XvG30ScWIV5KbnbetfI= In-Reply-To: (Noam Postavsky's message of "Fri, 5 Apr 2019 21:40:29 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235016 Archived-At: Noam Postavsky writes: > On Fri, 5 Apr 2019 at 16:50, Eric Abrahamsen wr= ote: > >> Katsumi Yamaoka's example is the group whose decoded name is "nnml:=E3= =83=86=E3=82=B9 >> =E3=83=88". This is written to .newsrc.eld as the string: >> >> "nnml:\343\203\206\343\202\271\343\203\210" > >> nnml:\343\203\206\343\202\271\343\203\210 > >> "nnml:=C3=A3\203\206=C3=A3\202=C2=B9=C3=A3\203\210" > >> I don't know how to turn either of these strings into the other -- >> either direction would work, but I don't know how. > > Are you maybe looking for decode-coding-string? > > (decode-coding-string > "nnml:\343\203\206\343\202\271\343\203\210" 'utf-8) ;=3D> "nnml:=E3=83= =86=E3=82=B9=E3=83=88" > > (decode-coding-string > (symbol-name (read "nnml:\343\203\206\343\202\271\343\203\210")) > 'utf-8) ;=3D> "nnml:=E3=83=86=E3=82=B9=E3=83=88" No, unfortunately -- that would make everything much easier. Eventually the idea will be to decode the strings into plain utf-8-emacs, but for now I'm stuck keeping them in this weird half-state. I literally need a conversion between the two versions above. If this turns out to be too ridiculous, I'll re-slice things as I mentioned earlier, and leave these group names as symbols. Eric