[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23184] Re: String Escapes and Encoding

From: "NARUSE, Yui" <naruse@...>
Date: 2009-04-12 05:50:14 UTC
List: ruby-core #23184
Hi,

James Gray wrote:
> I'm trying to document the affects of escapes like \x and \u on String 
> Encoding, for the m17n series on my blog.  Here are the rules I'm aware of:
> 
> * A \x String receives the source Encoding if it's not US-ASCII
> * A \x String where the escape creates a byte with the 8th bit set is 
> upgraded to ASCII-8BIT if the source Encoding is US-ASCII
> * A \u String is also given the Encoding of UTF-8
> 
> Do I have those rules right?  Are there other escapes that affect the 
> String Encoding?

Yes, right.
But just in case, there are \XXX (octal), \cX and \C-x (controll, this doesn't affect), \M-x (meta), and \M-\C-x (meta-controll). These effects are the same as \x escapes.

-- 
NARUSE, Yui  <naruse@airemix.jp>

In This Thread