[SVN] Re: TODO bundle fix for Ruby 1.8.7
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
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:iso8859-1:utf-8") # Transcoded to UTF-8
Maybe that's the way for 1.9.
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.
> 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.
>> On Aug 1, 2008, at 16:41, Pavel Kunc wrote:
>>> TODO bundle doesn't work with new versions of Ruby. I fixed it for
>>> 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
>>> textmate-dev mailing list
>>> textmate-dev at lists.macromates.com
>> textmate-dev mailing list
>> textmate-dev at lists.macromates.com
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
503 Enterprise House
London SE1 9PG
Tel: 0207 0968800
Fax: 0709 200 0450
More information about the textmate-dev