I am attempting to run a Cucumber (Ruby) Test Suite from Jenkins that tests whether or not 2-4 byte UTF-8 characters are valid names for groups.
I have tried a number of solutions and have been searching for days attempting to find an issue relevant to mine.
The error that has been haunting me is:
incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
Which refers to a line where I am attempting to send an ssh command to the CLI on the FreeBSD machine I am creating the group on:
$mymachine.cli_ssh.exec!("config group create --name='#{group_name}'")
Where within the exec!()
command exists:
command.force_encoding("UTF-8")
The error only occurs when I am sending 2-4 byte UTF-8 characters, such that:
Group 'abcd' does not cause the error and Group 'ЯЯЯ' does cause the error
The problem:
Running this script on my local Ubuntu machine works perfectly fine, as well as other machines in my area. (which is why I do not think it is necessary to provide more code than is given)
I have already tried establishing system locales on the Jenkins machine as en_US.UTF-8 both as locale system variables and within the /.bashrc file. No where have I seen an encoding variable set to ASCII-8BIT.
I have also tried exporting the system locales from the Jenkins shell prior to the script's execution.
I am in need of some answer, or some direction that can help me resolve this issue.