Gnus development mailing list
 help / color / mirror / Atom feed
* utf-7 decoding?
@ 1999-03-29  0:57 Felix Lee
  1999-03-29  3:28 ` François Pinard
  0 siblings, 1 reply; 9+ messages in thread
From: Felix Lee @ 1999-03-29  0:57 UTC (permalink / raw)


I see occasional messages that are utf-7 encoded without
appropriate mime headers and stuff.  Is there an easy way of
unmutilating them?  "C-u W M c" doesn't have a utf-7 thingy.

(utf-7 encoding looks like +ACI-this+ACI-)
--



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

* Re: utf-7 decoding?
  1999-03-29  0:57 utf-7 decoding? Felix Lee
@ 1999-03-29  3:28 ` François Pinard
  1999-04-02 13:53   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: François Pinard @ 1999-03-29  3:28 UTC (permalink / raw)
  Cc: ding

Felix Lee <flee@teleport.com> writes:

> I see occasional messages that are utf-7 encoded without
> appropriate mime headers and stuff.  Is there an easy way of
> unmutilating them?  "C-u W M c" doesn't have a utf-7 thingy.

For what it is worth, the next release of my `recode' tool does UTF-7.
Maybe there is some Emacs LISP code floating around to do the same?
If not, maybe the UTF-7 routines in `recode' could be recycled into Emacs
LISP code in Gnus?  I do not think that every such of those things should
be made part of Emacs guts in C, yet one never knows with Emacs :-).

Byte manipulations in Emacs LISP is usually rather slow.  For Q-P and Base64
conversions, I use `recode' instead of the Emacs LISP code (which is quite
natural as I'm exercising the pretest) and it is surely faster for me.

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard



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

* Re: utf-7 decoding?
  1999-03-29  3:28 ` François Pinard
@ 1999-04-02 13:53   ` Lars Magne Ingebrigtsen
  1999-04-02 15:09     ` François Pinard
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-02 13:53 UTC (permalink / raw)


François Pinard <pinard@iro.umontreal.ca> writes:

> Byte manipulations in Emacs LISP is usually rather slow.  For Q-P and Base64
> conversions, I use `recode' instead of the Emacs LISP code (which is quite
> natural as I'm exercising the pretest) and it is surely faster for me.

The base64 functions are in the C layer in Emacs 20.4, so that should
be fast.  (The code is from recode, even.  :-)  Kind of.)  QP is
usually used when there's not all that much to encode (I mean, when
most of the text is us-ascii), so putting that into the C layer is
probably not worth the bother, I think.

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


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

* Re: utf-7 decoding?
  1999-04-02 13:53   ` Lars Magne Ingebrigtsen
@ 1999-04-02 15:09     ` François Pinard
  1999-04-17  5:56       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: François Pinard @ 1999-04-02 15:09 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> écrit:

> François Pinard <pinard@iro.umontreal.ca> writes:

> > Byte manipulations in Emacs LISP is usually rather slow.  For Q-P and Base64
> > conversions, I use `recode' instead of the Emacs LISP code (which is quite
> > natural as I'm exercising the pretest) and it is surely faster for me.

> The base64 functions are in the C layer in Emacs 20.4, so that should
> be fast.  (The code is from recode, even.  :-)  Kind of.)  QP is
> usually used when there's not all that much to encode (I mean, when
> most of the text is us-ascii), so putting that into the C layer is
> probably not worth the bother, I think.

I have a similar feeling.  And to me, UTF-7 is a kind of QP meant for
Unicode, and maybe a similar reasonning could make Emacs-LISP tolerable.
Instead of speaking about it, I should attempt writing some code.
Things should become a little less stressing for me in a few weeks, and
it might even be fun writing this.  But of course, Lars, I would not like
to steel this pleasure from you, if you feel like having it sooner! :-)

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard


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

* Re: utf-7 decoding?
  1999-04-02 15:09     ` François Pinard
@ 1999-04-17  5:56       ` Lars Magne Ingebrigtsen
  1999-04-17 14:46         ` Hrvoje Niksic
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-17  5:56 UTC (permalink / raw)


François Pinard <pinard@IRO.UMontreal.CA> writes:

> But of course, Lars, I would not like to steel this pleasure from
> you, if you feel like having it sooner! :-)

I'm starting to see people posting stuff using utf-7, so it would be
nice to have some sort of support for that.  But how would one do that 
using the Mule framework?

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


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

* Re: utf-7 decoding?
  1999-04-17  5:56       ` Lars Magne Ingebrigtsen
@ 1999-04-17 14:46         ` Hrvoje Niksic
  1999-04-17 15:23           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hrvoje Niksic @ 1999-04-17 14:46 UTC (permalink / raw)


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

> François Pinard <pinard@IRO.UMontreal.CA> writes:
> 
> > But of course, Lars, I would not like to steel this pleasure from
> > you, if you feel like having it sooner! :-)
> 
> I'm starting to see people posting stuff using utf-7, so it would be
> nice to have some sort of support for that.  But how would one do
> that using the Mule framework?

The latest XEmacs/Mule is supposed to have UTF-8 support (I'm not sure 
about UTF-7), but it needs some special initialization.  Bleah.


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

* Re: utf-7 decoding?
  1999-04-17 14:46         ` Hrvoje Niksic
@ 1999-04-17 15:23           ` Lars Magne Ingebrigtsen
  1999-04-17 16:16             ` Hrvoje Niksic
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-17 15:23 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> The latest XEmacs/Mule is supposed to have UTF-8 support (I'm not sure 
> about UTF-7), but it needs some special initialization.  Bleah.

But how does it work?  Does `char-charset' on a utf-8 char say
`utf-8', or something?

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


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

* Re: utf-7 decoding?
  1999-04-17 15:23           ` Lars Magne Ingebrigtsen
@ 1999-04-17 16:16             ` Hrvoje Niksic
  1999-04-17 16:34               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hrvoje Niksic @ 1999-04-17 16:16 UTC (permalink / raw)


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

> Hrvoje Niksic <hniksic@srce.hr> writes:
> 
> > The latest XEmacs/Mule is supposed to have UTF-8 support (I'm not sure 
> > about UTF-7), but it needs some special initialization.  Bleah.
> 
> But how does it work?  Does `char-charset' on a utf-8 char say
> `utf-8', or something?

No, utf-8 is implemented as a coding-system, not a charset.  This
means that you can decode external data from utf-8 to internal format, 
and result in having ASCII, Latin-1, Latin-2, and other characters
inserted in the buffer.  Which is quite correct, I'd say.

Understanding the difference between a (Mule) charset and a (Mule)
coding-system is the first step to (Mule) enlightenment.


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

* Re: utf-7 decoding?
  1999-04-17 16:16             ` Hrvoje Niksic
@ 1999-04-17 16:34               ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-17 16:34 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> No, utf-8 is implemented as a coding-system, not a charset.  This
> means that you can decode external data from utf-8 to internal format, 
> and result in having ASCII, Latin-1, Latin-2, and other characters
> inserted in the buffer.  Which is quite correct, I'd say.

Oh, right.  That's certainly ok by me.

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


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

end of thread, other threads:[~1999-04-17 16:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-29  0:57 utf-7 decoding? Felix Lee
1999-03-29  3:28 ` François Pinard
1999-04-02 13:53   ` Lars Magne Ingebrigtsen
1999-04-02 15:09     ` François Pinard
1999-04-17  5:56       ` Lars Magne Ingebrigtsen
1999-04-17 14:46         ` Hrvoje Niksic
1999-04-17 15:23           ` Lars Magne Ingebrigtsen
1999-04-17 16:16             ` Hrvoje Niksic
1999-04-17 16:34               ` 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).