[SVN] Re: TODO bundle fix for Ruby 1.8.7

Pavel Kunc pavel at fry-it.com
Sun Aug 3 10:44:11 UTC 2008


I also tried to fix it for the 1.9, but as you I found it not so easy
to go. I think that it could posibly solved by setting bundle program
to UTF-8 and encode all the input sources during processing to UTF-8
using Iconv. Of course that seems to me a bit "too much work for the
bundle".

However there are more options for encodings in 1.9. It's not only
possible to set -E and --encoding which makes default encoding UTF-8,
but you can for each stream set encoding or transcoding.

File.open("data.txt", "r:utf-8")
File.open("data.txt", "r:iso8859-1:utf-8") # Transcoded to UTF-8

Maybe that's the way for 1.9.

Pavel

On Sat, Aug 2, 2008 at 11:38 PM, Soryu <soryu at serenity.de> wrote:
>
> OK, this is not feasible right now.
>
> I added the stupid ruby 1.9 encoding hints to the relevant files but
> the command still fails. As do almost all TM commands involving ruby
> (because of the unspecified encoding per source file…). Let's just
> hope they will correct this before release.
>
> Specifying ruby -E utf-8 as TM_RUBY does not work, because the command
> is quoted when executed, so it does not allows for parameters. And
> ruby 1.9 does not seem to pick up LC_CTYPE or LANG and apply it to
> file encoding. These are set to en_US.UTF-8 for me and ruby says that
> __ENCODING__ is set to UTF-8 but it still does not work w/o specifying
> utf-8 in every single ruby file.
>
> So either I'm doing something else wrong or we just wait for ruby 1.9
> to actually release before using it.
>
> Cheers,
> Soryu.
>
>
>
> On Aug 2, 2008, at 23:14, Soryu wrote:
>
>>
>> r10355 /trunk/Bundles/TODO.tmbundle/Support/todo.rb: Applied patch
>> from Pavel Kunc to make TODO Bundle work with Ruby 1.8.7.
>>
>> Thanks a lot Pavel. I'll look into the Ruby 1.9 issue immediately.
>>
>> Soryu.
>>
>> On Aug 1, 2008, at 16:41, Pavel Kunc wrote:
>>
>>> Hi,
>>>
>>> TODO bundle doesn't work with new versions of Ruby. I fixed it for
>>> the
>>> 1.8.7 for now because it's the version I use. Changes are backward
>>> compatible with 1.8.6. It still doesn't work with 1.9 due to some
>>> UTF-8 errors I didn't investigate.
>>>
>>> I've attached patch to fix the issues.
>>>
>>> Pavel Kunc
>>>
>>> --
>>> <todo.patch>_______________________________________________
>>> textmate-dev mailing list
>>> textmate-dev at lists.macromates.com
>>> http://lists.macromates.com/listinfo/textmate-dev
>>
>> _______________________________________________
>> textmate-dev mailing list
>> textmate-dev at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate-dev
>
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate-dev
>



-- 
Pavel Kunc
FRY-IT Limited
503 Enterprise House
1/2 Hatfields
London SE1 9PG
Tel: 0207 0968800
Fax: 0709 200 0450
Web: http://www.fry-it.com



More information about the textmate-dev mailing list