all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: ISO-8859-1  encoded file names and UTF-8
Date: Thu, 20 Mar 2003 08:52:24 +0900 (JST)	[thread overview]
Message-ID: <200303192352.IAA00475@etlken.m17n.org> (raw)
In-Reply-To: <shn0jr2uz5.fsf@tux.gnu.franken.de> (message from Karl Eichwalder on Wed, 19 Mar 2003 17:15:42 +0100)

In article <shn0jr2uz5.fsf@tux.gnu.franken.de>, Karl Eichwalder <keichwa@gmx.net> writes:
> I think there is still a subtle bug left; in a ISO-8859-1 locale do:

> touch "Maler Müller"

> Then call emacs:

> LANG=de_DE.UTF-8 emacs -q --no-site --no-splash .

> In dired you can see:

>   -rw-r--r--  1 ke  users   0 2003-03-19 16:10 Maler M\374ller\374rle
>                                      good part ^^^^^^^^^^^^^^^|||||||
>                               trailing garbage ------------>>>^^^^^^^

Ah!  That's a bug of utf-8 decoder.  I've just installed the
attached fix.

>>  Should the recoding of filename regarded as a kind of file name
>>  changing?  If so, perhaps we should make the function rename-file to
>>  handle also recoding.   In that case, how should we tell rename-file
>>  to actually recode filename encoding?

> If the user calls rename-file it should be up to him to specify a proper
> file name.  In other words I vote to provide a separate function like
> convert-file-name to do the right thing; by default convert-file-name
> should try to convert the file name to the user's locale.

As we already have the function convert-standard-filename, I
think the name convert-file-name is confusing.  So, I prefer
the name recode-file-name if we'll have a separate function.

---
Ken'ichi HANDA
handa@m17n.org

*** utf-8.el.~1.26.~	Tue Mar 18 09:09:15 2003
--- utf-8.el	Thu Mar 20 08:22:42 2003
***************
*** 479,497 ****
  			 (write-multibyte-character r5 r3))
  		     (write-multibyte-character r6 r3))
  		   (if (r0 >= #xf8)	; 5- or 6-byte encoding
! 		       ((read r1)
! 			(if (r1 < #xa0)
! 			    (if (r1 < #x80) ; invalid byte
! 				(write r1)
! 			      (write-multibyte-character r5 r1))
! 			  (write-multibyte-character r6 r1))
  			(if (r0 >= #xfc) ; 6-byte
! 			    ((read r1)
! 			     (if (r1 < #xa0)
! 				 (if (r1 < #x80) ; invalid byte
! 				     (write r1)
! 				   (write-multibyte-character r5 r1))
! 			       (write-multibyte-character r6 r1)))))))
  		;; else invalid byte >= #xfe
  		(write-multibyte-character r6 r0))))))
        (repeat)))
--- 479,499 ----
  			 (write-multibyte-character r5 r3))
  		     (write-multibyte-character r6 r3))
  		   (if (r0 >= #xf8)	; 5- or 6-byte encoding
! 		       ((r0 = -1)
! 			(read r0)
! 			(if (r0 < #xa0)
! 			    (if (r0 < #x80) ; invalid byte
! 				(write r0)
! 			      (write-multibyte-character r5 r0))
! 			  (write-multibyte-character r6 r0))
  			(if (r0 >= #xfc) ; 6-byte
! 			    ((r0 = -1)
! 			     (read r0)
! 			     (if (r0 < #xa0)
! 				 (if (r0 < #x80) ; invalid byte
! 				     (write r0)
! 				   (write-multibyte-character r5 r0))
! 			       (write-multibyte-character r6 r0)))))))
  		;; else invalid byte >= #xfe
  		(write-multibyte-character r6 r0))))))
        (repeat)))

  reply	other threads:[~2003-03-19 23:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-08  6:15 ISO-8859-1 encoded file names and UTF-8 Karl Eichwalder
2003-03-08  9:16 ` Eli Zaretskii
2003-03-08 10:05   ` Karl Eichwalder
2003-03-08 17:06     ` Eli Zaretskii
2003-03-08 18:25       ` Karl Eichwalder
2003-03-08 22:35         ` Eli Zaretskii
2003-03-09  4:38           ` Karl Eichwalder
2003-03-19 13:33 ` Kenichi Handa
2003-03-19 16:15   ` Karl Eichwalder
2003-03-19 23:52     ` Kenichi Handa [this message]
2003-03-20 17:32       ` Karl Eichwalder
2003-03-21  6:01         ` Kenichi Handa
2003-03-21 19:53           ` Karl Eichwalder
2003-03-21 19:06       ` Richard Stallman
2003-03-20  8:46   ` Richard Stallman
2003-03-20  9:11     ` Kenichi Handa
2003-03-23  2:52       ` Richard Stallman
2003-03-24  0:28         ` Kenichi Handa
2003-03-24 19:27           ` Richard Stallman
2003-03-26  4:47             ` Kenichi Handa
2003-04-01 21:17   ` etags and UTF-8 encoded file names (Re: ISO-8859-1 encoded file names and UTF-8) Karl Eichwalder
2003-04-02  1:34     ` Kenichi Handa
2003-04-02 19:26       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200303192352.IAA00475@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.