[SVN] Re: executor.rb: Changes for Ruby 1.9
James Gray
james at grayproductions.net
Fri Aug 29 18:45:40 UTC 2008
On Aug 29, 2008, at 6:01 AM, Charles Turner wrote:
> On Thu, 28 Aug 2008 15:43:15 -0500, James Gray wrote:
>> On Aug 28, 2008, at 3:34 PM, Charles Turner wrote:
>>
>>> On Thu, 28 Aug 2008 14:48:37 -0500, James Gray wrote:
>>>> This patch loads jcode, but doesn't call any jcode methods. We
>>>> should
>>>> be able to remove that line.
>>>
>>>> $KCODE = "U" is also the old 1.9 strategy. I believe the 1.9
>>>> equivalent would be:
>>>> # coding: UTF-8
>>>
>>> Sorry again! I had to remove these to get executor.rb to work in 1.9
>>
>> Yeah, and that's vital to it working in 1.8, so that's just not going
>> to work for us.
>
> Hi James-
>
> This works for me in 1.9.0, and I assume it would work in 1.8.x:
>
> if RUBY_VERSION !~ /1.9/
> $KCODE = 'u'
> require 'jcode'
> end
I seriously doubt it does. All you do here is disable our Ruby 1.8
encoding handling. You do not implement a 1.9 strategy though.
Ruby 1.9 defaults to assuming an ASCII encoding, so it probably just
seems to work because you haven't fed it any tricky input. I'm
willing to bet it will choke as soon as multibyte characters are
involved.
We're going to need to figure out the right way to support UTF-8 on
Ruby 1.9 to fix this correctly.
James Edward Gray II
More information about the textmate-dev
mailing list