all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* automatically replacing, e.g., <DF>, by umlaut?
@ 2009-04-21  8:45 Ulrich Scholz
  2009-04-21 14:20 ` Anselm Helbig
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ulrich Scholz @ 2009-04-21  8:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, I often have the problem that when I copy and past some text from
the console into Emacs, the umlauts are shown as sequence of
characters <DF> or \317 (number may be wrong).

Is there some function to automatically replace these strings by the
corresponding umlaut?

I know that the best solution would be to have the proper language
setting, font, character mapping, aso.  But for years now, I failed to
get it right and there is no sign that this could change.

Best,

Ulrich


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

* Re: automatically replacing, e.g., <DF>, by umlaut?
  2009-04-21  8:45 automatically replacing, e.g., <DF>, by umlaut? Ulrich Scholz
@ 2009-04-21 14:20 ` Anselm Helbig
  2009-04-21 15:21   ` d7
  2009-04-21 19:29 ` Peter Dyballa
       [not found] ` <mailman.5773.1240342213.31690.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Anselm Helbig @ 2009-04-21 14:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Ulrich!

> Hi, I often have the problem that when I copy and past some text from
> the console into Emacs, the umlauts are shown as sequence of
> characters <DF> or \317 (number may be wrong).
> 
> Is there some function to automatically replace these strings by the
> corresponding umlaut?
> 
> I know that the best solution would be to have the proper language
> setting, font, character mapping, aso.  But for years now, I failed to
> get it right and there is no sign that this could change.

Well, of course there is no built-in function to correct what
shouldn't be broken in the first place. I've got 

  (setq selection-coding-system 'utf-8) 

in my .emacs and everything seems to work fine - I'm on Ubuntu 8.04
with Emacs 23. Maybe you should start emacs with the -Q switch so that
it doesn't load your customizations and start to find the culprit /
experiment with different coding systems.

Try C-x <RET> x, C-x <RET> X, and of course 
M-x customize-variable selection-coding-system until this works. 

A workaround might be to save the pasted text in a file and explicitly
open this file with another coding system, 

  C-x <RET> c

is your friend here. 

What emacs version are you using? What OS are you on? It might be
worthwhile to try out the current development version of emacs if
you're not running Emacs 23 already. 

HTH, 

Kind regards, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


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

* Re: automatically replacing, e.g., <DF>, by umlaut?
  2009-04-21 14:20 ` Anselm Helbig
@ 2009-04-21 15:21   ` d7
  0 siblings, 0 replies; 6+ messages in thread
From: d7 @ 2009-04-21 15:21 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks for your suggestions, I will certainly try them.

But as I said: I tried a lot and there are so many different
applications and settings around that I don't expect it ever to work.

BTW, I'm using Emacs 22.2.1 on Kubuntu 8.10

Ulrich


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

* Re: automatically replacing, e.g., <DF>, by umlaut?
  2009-04-21  8:45 automatically replacing, e.g., <DF>, by umlaut? Ulrich Scholz
  2009-04-21 14:20 ` Anselm Helbig
@ 2009-04-21 19:29 ` Peter Dyballa
       [not found] ` <mailman.5773.1240342213.31690.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-04-21 19:29 UTC (permalink / raw)
  To: Ulrich Scholz; +Cc: help-gnu-emacs


Am 21.04.2009 um 10:45 schrieb Ulrich Scholz:

> Hi, I often have the problem that when I copy and past some text from
> the console into Emacs, the umlauts are shown as sequence of
> characters <DF> or \317 (number may be wrong).

What about switching all utilities and the windowing system to the  
same encoding? With GNU Emacs 22.x or 23 UTF-8 is the right choice.  
LANG or LC_ALL or LC_CTYPE would be something like de_DE.UTF-8 and  
the fonts are best ISO 10646 encoded ...

The actual cause could be that the X server tells GNU Emacs that the  
X selection is of type UTF-8 – and it's not! It's probably ISO  
8859-1, so ß is encoded as one single byte with value 0xDF or \317.  
And since GNU Emacs gets told "the data is rather binary UTF-8" it  
does not need to convert it and inserts each byte unchanged.

The easier solution: make your console UTF-8 encoded.

--
Mit friedvollen Grüßen

   Pete

Irgendwer sollte den Kugelschreiber mit einem Kleiderbügel kreuzen,  
dass die Kulis sich vermehren, statt stets nur zu verschwinden!






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

* Re: automatically replacing, e.g., <DF>, by umlaut?
       [not found] ` <mailman.5773.1240342213.31690.help-gnu-emacs@gnu.org>
@ 2009-04-22  9:28   ` d7
  2009-04-22 10:01     ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: d7 @ 2009-04-22  9:28 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks for your help.  But actually, all my LC_* are either
de_DE.UTF-8 or en_EN.UTF-8. And there is still the problem that you
get files from others that contain these strings instead of the
umlauts.  So in the end, having an automatic "stupid" conversion
function is worth the effort.

Ulrich


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

* Re: automatically replacing, e.g., <DF>, by umlaut?
  2009-04-22  9:28   ` d7
@ 2009-04-22 10:01     ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2009-04-22 10:01 UTC (permalink / raw)
  To: d7; +Cc: help-gnu-emacs


Am 22.04.2009 um 11:28 schrieb d7@thispla.net:

>  And there is still the problem that you
> get files from others that contain these strings instead of the
> umlauts.

You can open or re-open a file in a different encoding. See Options  
menu -> Mule -> Set Coding Systems -> <whatever>.

--
Mit friedvollen Grüßen

   Pete

Eternity is a terrible thought. I mean, where's it going to end?
				- Tom Stoppard







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

end of thread, other threads:[~2009-04-22 10:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21  8:45 automatically replacing, e.g., <DF>, by umlaut? Ulrich Scholz
2009-04-21 14:20 ` Anselm Helbig
2009-04-21 15:21   ` d7
2009-04-21 19:29 ` Peter Dyballa
     [not found] ` <mailman.5773.1240342213.31690.help-gnu-emacs@gnu.org>
2009-04-22  9:28   ` d7
2009-04-22 10:01     ` Peter Dyballa

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.