unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fixing Gnus, and string encoding question
@ 2019-04-05 20:47 Eric Abrahamsen
  2019-04-06  1:40 ` Noam Postavsky
  2019-04-06  8:26 ` Andreas Schwab
  0 siblings, 2 replies; 14+ messages in thread
From: Eric Abrahamsen @ 2019-04-05 20:47 UTC (permalink / raw)
  To: emacs-devel

So I've made a hash of this change (ha), and am trying to figure out the
best solution.

The problem is that non-ASCII group names are now strings, and are
coming into the system in two different ways: written into .newsrc.eld
with `print-escape-nonascii' set to t, and read off the filesystem using
a buffer with mutibyte disabled. The two methods don't match up -- the
strings are different.

Katsumi Yamaoka's example is the group whose decoded name is "nnml:テス
ト". This is written to .newsrc.eld as the string:

"nnml:\343\203\206\343\202\271\343\203\210"

Those aren't actual escapes, just backslashes and numbers.

The group name is read from file with `set-buffer-multibyte' nil, using
`read' to pick the group name up as a symbol, then using `symbol-name'
to turn it into a string. The symbol looks like:

nnml:\343\203\206\343\202\271\343\203\210 

And the resulting string is:

"nnml:ã\203\206ã\202¹ã\203\210"

Where the escapes are real escapes, I've typed them out here. The two
strings aren't `equal', obviously.

I don't know how to turn either of these strings into the other --
either direction would work, but I don't know how.

Another option is to give up messing with strings, and back the changes
halfway out: still use hash tables, but leave the group names as
symbols, with their current funky encoding. That's probably how I should
have sliced these changes to begin with. Then a later step would be to
go straight from symbols to fully decoded strings.

Hoping for some guidance,
Eric




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-04-07 17:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05 20:47 Fixing Gnus, and string encoding question Eric Abrahamsen
2019-04-06  1:40 ` Noam Postavsky
2019-04-06  2:22   ` Eric Abrahamsen
2019-04-06  3:56     ` Noam Postavsky
2019-04-07  2:32       ` Eric Abrahamsen
2019-04-07  4:10       ` Eric Abrahamsen
2019-04-07  7:05         ` Andreas Schwab
2019-04-07 17:17           ` Eric Abrahamsen
2019-04-07 11:59         ` Noam Postavsky
2019-04-07 12:18           ` Andreas Schwab
2019-04-07 12:41         ` Andreas Schwab
2019-04-06  6:20     ` Eli Zaretskii
2019-04-07  2:30       ` Eric Abrahamsen
2019-04-06  8:26 ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).