From: Martin Duerst Date: 2009-02-08T16:31:31+09:00 Subject: [ruby-core:21927] Re: mule-utf-8 I think for the reported issue, the best thing is to fix -*- coding: mule-utf-8 -*- to -*- coding: utf-8 -*- As for the definition of mule-utf-8, I'm also not familiar with it, but the best information I found was: http://www.koders.com/lisp/fid3DDD5163F8F196DF87FA2396D27C77E592DC2C3C.aspx?s=sort ;; The coding-system `mule-utf-8' basically supports encoding/decoding ;; of the following character sets to and from UTF-8: ;; ;; ascii ;; eight-bit-control ;; latin-iso8859-1 ;; mule-unicode-0100-24ff ;; mule-unicode-2500-33ff ;; mule-unicode-e000-ffff ;; ;; On decoding, Unicode characters that do not fit into the above ;; character sets are handled as `eight-bit-control' or ;; `eight-bit-graphic' characters to retain the information about the ;; original byte sequence and text properties record the corresponding ;; unicode. So mule-utf-8 seems to be used to indicate a subset of UTF-8, or UTF-8 with some special mule-internal treatment for some specific character range (U+3400-DFFF, which includes CJK ideographs). One of my guesses is that this special treatement was introduced to avoid deciding which of C/J/K the ideographs should go to. As Ruby supports UTF-8 fully, without the need to decide whether an ideograph is Chinese, Japanese, or Korean,..., that would mean that we can handle mule-utf-8 simply as UTF-8. But because mule-utf-8 in that case is simply an artefact of some mule-internal details, I'd be rather reluctant to support such a label at all. Regards, Martin. At 02:11 09/02/07, you wrote: >I'm also not familiar with this encoding, I was surprised as well. >While the link below is not authoritative information, it may hint, that >this is an alias for utf-8. >http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/e7dc49d8ec4b937f?pli=1 > > >My original question was, whenever the support for this encoding wasn't >included by mistake (since I've seen some emacs related encodings file), or not. > >--Roman > > >----- Original Message ---- >From: "NARUSE, Yui" >To: ruby-core@ruby-lang.org >Sent: Friday, February 6, 2009 6:23:06 PM >Subject: [ruby-core:21892] Re: mule-utf-8 > >Hi, > >Roman Shterenzon wrote: >> When I attempted to run some rails application with Ruby 1.9, the >> following exception was raised: >> >> unknown encoding name: mule-utf-8 >> >> The offending file, so it turns out, was in the >> restful-authentication plugin, which had this coding specified by: # >> -*- coding: mule-utf-8 -*- >> >> The question is, whenever this is a Ruby bug, and this encoding >> should be supported (there's a file called enc/emacs_mule.c, which >> might be related). > >You know ruby can't support all the encodings in the world. >But we want to support many useful encodings. > >I didn't know mule-utf-8 before this time, and I know only the name. >By some googled information, mule-utf-8 seems different from UTF-8. >(if a encoding equals UTF-8, add the alias is easy) >If ruby should support the encoding, we want more information about its >byte structure. > > >-- NARUSE, Yui > > > #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp