Gnus development mailing list
 help / color / mirror / Atom feed
* Re: \201 *waugh*
  2000-12-28 19:55 \201 *waugh* Lars Magne Ingebrigtsen
@ 2000-12-28 18:27 ` ShengHuo ZHU
  2000-12-28 22:10   ` Lars Magne Ingebrigtsen
  2000-12-28 18:48 ` Kai Großjohann
  1 sibling, 1 reply; 6+ messages in thread
From: ShengHuo ZHU @ 2000-12-28 18:27 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> After upgrading to the latest cvs, nnwfm stopped working with Emacs
> 20.6.  Which is really weird, since nnwfm didn't change at all.
> 
> Now -- I insert lots of stuff into a unibyte buffer.  I then use
> w3-parse on the stuff in the buffer.  I then get strings like
> 
>   "aksje-\345r"
> 
> Now, how on earth do I get that inserted back into a buffer, and why
> did it stop working?
> 
> (insert "aksje-\345r")
> => aksje-år
> 
> That's not what I want.  I want something I can then run
> decode-coding-region on, like in all other groups.

When a unibyte string is inserted into a multibyte buffer, Emacs
automatically converts 8-bit characters into iso8859-1 characters.  To
insert literally 8-bit characters, you have to use some tricks like

 (insert (string-as-multibyte "aksje-\345r"))

XEmacs doesn't have string-as-multibyte, so we'd better define a
compatible function mm-string-as-multibyte.  Though you may see 
aksje-år in XEmacs buffer if you insert the string, it is OK. XEmacs
people claim that XEmacs doesn't suffer the \201 problem.

ShengHuo



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

* Re: \201 *waugh*
  2000-12-28 19:55 \201 *waugh* Lars Magne Ingebrigtsen
  2000-12-28 18:27 ` ShengHuo ZHU
@ 2000-12-28 18:48 ` Kai Großjohann
  2000-12-28 22:12   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2000-12-28 18:48 UTC (permalink / raw)


On 28 Dec 2000, Lars Magne Ingebrigtsen wrote:

> Now -- I insert lots of stuff into a unibyte buffer.  I then use
> w3-parse on the stuff in the buffer.

I wonder: does w3-parse want to see a sequence of bytes or a sequence
of characters in the buffer?  Maybe it helps to see what url.el
deposits in url-working-buffer.

kai
-- 
~/.signature



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

* \201 *waugh*
@ 2000-12-28 19:55 Lars Magne Ingebrigtsen
  2000-12-28 18:27 ` ShengHuo ZHU
  2000-12-28 18:48 ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-12-28 19:55 UTC (permalink / raw)


After upgrading to the latest cvs, nnwfm stopped working with Emacs
20.6.  Which is really weird, since nnwfm didn't change at all.

Now -- I insert lots of stuff into a unibyte buffer.  I then use
w3-parse on the stuff in the buffer.  I then get strings like

  "aksje-\345r"

Now, how on earth do I get that inserted back into a buffer, and why
did it stop working?

(insert "aksje-\345r")
=> aksje-år

That's not what I want.  I want something I can then run
decode-coding-region on, like in all other groups.

Please.  Help me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: \201 *waugh*
  2000-12-28 18:27 ` ShengHuo ZHU
@ 2000-12-28 22:10   ` Lars Magne Ingebrigtsen
  2000-12-29  6:07     ` ShengHuo ZHU
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-12-28 22:10 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> When a unibyte string is inserted into a multibyte buffer, Emacs
> automatically converts 8-bit characters into iso8859-1 characters.

Oh.  Huh.  Is that a new thing?  How does it know that I want
iso8859-1 and not anything else?

> To insert literally 8-bit characters, you have to use some tricks
> like
> 
>  (insert (string-as-multibyte "aksje-\345r"))

That did the trick; thanks.

> XEmacs doesn't have string-as-multibyte, so we'd better define a
> compatible function mm-string-as-multibyte.

Yup.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: \201 *waugh*
  2000-12-28 18:48 ` Kai Großjohann
@ 2000-12-28 22:12   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-12-28 22:12 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> I wonder: does w3-parse want to see a sequence of bytes or a sequence
> of characters in the buffer?  Maybe it helps to see what url.el
> deposits in url-working-buffer.

Hm...  I would guess that w3 wants characters, and not bytes.  So
perhaps the correct thing would be to decode the text, give it to w3,
and then encode the results, since Gnus expects a sequence of bytes.
And then Gnus will decode it again.

Alternatively, I can just use string-as-multibyte.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: \201 *waugh*
  2000-12-28 22:10   ` Lars Magne Ingebrigtsen
@ 2000-12-29  6:07     ` ShengHuo ZHU
  0 siblings, 0 replies; 6+ messages in thread
From: ShengHuo ZHU @ 2000-12-29  6:07 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> ShengHuo ZHU <zsh@cs.rochester.edu> writes:
> 
> > When a unibyte string is inserted into a multibyte buffer, Emacs
> > automatically converts 8-bit characters into iso8859-1 characters.
> 
> Oh.  Huh.  Is that a new thing?  How does it know that I want
> iso8859-1 and not anything else?

I guess it is at least as old as the \201 problem. The default coding
system can be customized, but it can not be binary (no decoding).

ShengHuo



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

end of thread, other threads:[~2000-12-29  6:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-28 19:55 \201 *waugh* Lars Magne Ingebrigtsen
2000-12-28 18:27 ` ShengHuo ZHU
2000-12-28 22:10   ` Lars Magne Ingebrigtsen
2000-12-29  6:07     ` ShengHuo ZHU
2000-12-28 18:48 ` Kai Großjohann
2000-12-28 22:12   ` Lars Magne Ingebrigtsen

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 NNTP newsgroup(s).