From: James Gray Date: 2009-04-08T23:47:54+09:00 Subject: Re: Ruby 1.9.1 - invalid multibyte escape: // (RegexpError) On Apr 8, 2009, at 3:03 AM, Brian Candler wrote: > * What about string literals which include escape sequences like \u? > This seems to override the source encoding rule. I plan to cover this in the next article. > * What encoding is chosen for regexp literals? (Seems to be different > rules to string literals). What about string literals which include > #{interpolation}? What about regexp literals which include > #{interpolation}? I'm going to cover this too. > * I think it will be worth explaining what you need to do to handle > binary data (using "rb" and "wb", the ASCII-8BIT encoding, how to set > external encoding for STDIN, the fact that read() and gets() return > different encodings for the same data...) Planned for the next article. > * What actually happens if you use string operations on two strings > with > different encodings? e.g. str1 == str2, str1 + str2, str1 << str2? > What > about indexing a hash with two strings which are identical byte > sequences but different encodings? I feel a gave a much better strategy that prevents you from worrying about such things. However, that article did link to a detailed explanation. James Edward Gray II