[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: ISO8859<->UTF8 med Emacs



On Sat, 14 Jan 2006 21:57:13 +0100 (CET), Peter wrote:

> Jeg har jævnligt opgaven med at konvertere en fil mellem 
> ISO8859 til og fra UTF8. Kan man ikke nemt lave det i Emacs?

Er det snyd at kalde recode(1)?

(defun asjo-recode (prefix)
  "Recode iso-8859-1 to utf-8 by calling /usr/bin/recode.
   Reverses convertion order if prefix is given."
  (interactive "p")
  (let ((convertion (if (> prefix 1) "utf8..iso8859-1" "iso8859-1..utf8")))
        (shell-command-on-region (point-min) (point-max)
                                 (concat "/usr/bin/recode " convertion) nil t)))


  Mvh.

-- 
 "I gotta go right now; someone is videotaping me in my       Adam Sjøgren
  spaceship"                                             sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-02-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *