Hi All,
I got an error today, that I’m sure is trivial, but I haven’t been able to find
an answer on the list or on other sites. Just in case, I’m running the tests on
a Windows 7 machine with a uk locale.
I have a step with the following text
Given the narrative is 入金
When I run jBehave inside intellij everything is happy, but when I run it from
the command line using maven the test fails, as jbehave is not loading those
two characters as Unicode characters, but rather 3 characters. Here’s the output
java.lang.AssertionError:
Expected: "ÕàÑÚçæ"
got: "??"
The “got” part is ok, as the windows console can’t display unicode characters,
but the expected (which is taken from the step) is incorrect.
I’m wondering if I need to set up something in the configuration to hint
jbehave to load the story files using UTF-8, but I have the idea that it
already does so. In the meantime I’m getting the bytes from the string, and
creating a new string with the “UTF-8” charset and that does the trick, but I’m
sure there’s an easier, more transparent way.
Thanks a lot!
Augusto
________________________________
The information contained in this email is strictly confidential and for the
use of the addressee only, unless otherwise indicated. If you are not the
intended recipient, please do not read, copy, use or disclose to others this
message or any attachment. Please also notify the sender by replying to this
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any
copies of it. Opinions, conclusions (etc) that do not relate to the official
business of this company shall be understood as neither given nor endorsed by
it. IG Group Holdings plc is a company registered in England and Wales under
number 04677092. VAT registration number 761 2978 07. Registered Office: Cannon
Bridge House, 25 Dowgate Hill, London EC4R 2YA. Listed on the London Stock
Exchange. Its subsidiaries IG Markets Limited and IG Index Limited are
authorised and regulated by the Financial Services Authority (IG Markets
Limited FSA registration number 195355 and IG Index Limited FSA registration
number 114059).