What is the console codepage you're starting cucumber from? (use chcp
in the console)
Because that line is this:
https://github.com/aslakhellesoy/cucumber/blob/master/lib/cucumber/formatter/unicode.rb#L12
`cmd /c chcp` =~ /(\d+)/
And if the current command prompt is not in a UTF-8 compatible
codebase, the result from cmd will trigger the failure.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
So that is the console you're invoking cucumber from?
>
> if I switch to chcp 65001 or chcp 1252, it's the same. Moreover, I'm
> mainly using Rubymine IDE and I can't change the cp in their editor
>
Are you using the same command prompt you change the codepage before?
Please try this at the command line:
ruby -ve "`cmd /c chcp` =~ /(\d+)/; puts $1"
What is the output?
I don't know how to change RubyMine, so can't help you there.
Please invoke cucumber and rake from the console, *after* setting chcp
to 1252 at minimum
You can also change chcp permanently by editing the registry, but I
would love if you can execute from the command line first to determine
if the issue is RubyMine or not interfering with the right behavior.
Can you also verify your cucumber .feature files are saved in UTF-8 encoding?
If this doesn't help, let's see if we can do a TeamViewer session
today to help you out.
> On Mon, Jan 31, 2011 at 6:27 AM, erwann <erwa...@gmail.com> wrote:
>>
>>> I don't know how to change RubyMine, so can't help you there.
>>
>> I'll ask them but I want to make it work on win console before
>>
>>> Please invoke cucumber and rake from the console, *after* setting chcp
>>> to 1252 at minimum
>>
>> That's what I made:
>> open console
>> chcp 1252
>> rake cucumber -> error
>> chcp 65001
>> rake cucumber -> error
>>
>
> Can you also verify your cucumber .feature files are saved in UTF-8 encoding?
>
If it turns out that saving the file as UTF-8 resolves the issue, I
can output an error message asking the user to verify that the file is
saved as UTF-8.
WDYT?
Aslak
> If this doesn't help, let's see if we can do a TeamViewer session
> today to help you out.
> --
> Luis Lavena
> AREA 17
> -
> Perfection in design is achieved not when there is nothing more to add,
> but rather when there is nothing more to take away.
> Antoine de Saint-Exupéry
>
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
Can you do me one small favor before giving up?
Provide me the output of the following:
SET LC_ALL
SET LC_CTYPE
SET LANG
These environment variables will affect how Ruby read files.
A workaround will be mark the encoding of all the cucumber files with
magic comment (#encoding: UTF-8)
It stops earlier than executing cucumber because you're running a
"rails server" which is using the db.
Can you ensure no background rails server is been executed, no
rspec/autotest or cucumber is also executed when you test?
I'm having problems to recreate your environment to help you better, sorry.
No, that is RDoc issue, which can be solved by updating rdoc gem.
Can you jump on IRC? I'm on RubyInstaller channel (#rubyinstaller)
I would like to do a TeamViewer session with you if possible.
Please download the Quick Support package:
http://www.teamviewer.com/en/download/index.aspx
My nickname is "luislavena"
For the ones that want to know, we solved the issue setting
CUCUMBER_OUTPUT_ENCODING environment variable.
Aslak: seems to me that unicode.rb is not loaded in UTF-8 mode and
thus making the regexp around 'chcp' fail.
Will test it further and send you a pull request with the modifications.
> On Sun, Feb 6, 2011 at 1:08 PM, Luis Lavena <luisl...@gmail.com> wrote:
>> On Sun, Feb 6, 2011 at 11:05 AM, erwann <erwa...@gmail.com> wrote:
>>>
>>> I configured my laptop with the same programs (win 7 x64, latest Ruby
>>> devkit and gems) and I have the same error
>>> invalid byte sequence in UTF-8 (ArgumentError)
>>
>> Can you jump on IRC? I'm on RubyInstaller channel (#rubyinstaller)
>>
>> I would like to do a TeamViewer session with you if possible.
>>
>> Please download the Quick Support package:
>>
>> http://www.teamviewer.com/en/download/index.aspx
>>
>> My nickname is "luislavena"
>>
>
> For the ones that want to know, we solved the issue setting
> CUCUMBER_OUTPUT_ENCODING environment variable.
>
> Aslak: seems to me that unicode.rb is not loaded in UTF-8 mode and
> thus making the regexp around 'chcp' fail.
>
> Will test it further and send you a pull request with the modifications.
>
Thanks Luis!
Aslak
> --
> Luis Lavena
> AREA 17
> -
> Perfection in design is achieved not when there is nothing more to add,
> but rather when there is nothing more to take away.
> Antoine de Saint-Exupéry
>