Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use feature files with multi-byte characters in filename using cucumber.yml #1666

Open
numaperi opened this issue Sep 15, 2022 · 1 comment

Comments

@numaperi
Copy link

πŸ‘“ What did you see?

Unable to use feature files with multi-byte characters in the filename (e.g. あ.feature ) when I specified its path in cucumber.yml.
The following error message appears.

"\xE3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

The paths read in YML are converted from UTF-8 to ASCII-8bit by Shellword in cucumber-8.0.0/lib/cucumber/cli/profile_loader.rb.
This problem can be resolved by using force_encoding("utf-8").

βœ… What did you expect to see?

I would like it to work even if the path specified in cucumber.yml contains files with multibyte characters.

πŸ“¦ Which tool/library version are you using?

cucumber (8.0.0)

πŸ”¬ How could we reproduce it?

  1. Create a cucumber.yml
default: features
  1. Add an empty file in the 'features' directory named 'あ.feature'
    Originally, this feature file will contain test code starting with #language:ja. It is not required for reproduction.
  2. Run a test using the 'cucumber' command.
  3. See error '"\xE3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)γ€€[my_env_path]/cucumber-messages-18.0.0/lib/cucumber/messages/message/serialization.rb:59:in `to_json''

πŸ“š Any additional context?

@luke-hill
Copy link
Contributor

This feels like an ugly hybrid of cucumber and yml errors.

You have mentioned a solution, would you be able to push up a failing test as commit 1, and then provide your fix to see if we're able to just merge it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants