Thanks Alexander and Mauro! I was missing -Dfile.encoding=UTF-8
Cheers, Augusto -----Original Message----- From: Mauro Talevi [mailto:[email protected]] Sent: 17 April 2012 18:30 To: [email protected] Subject: Re: [jbehave-user] Re: Japanese characters in step parameters You need to ensure you are using UTF-8 encoding consistently. If you are using Maven, ensure you set in your POM: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <resource.encoding>UTF-8</resource.encoding> </properties> and add "-Dfile.encoding=UTF-8" to your MAVEN_OPTS env variable. On 17/04/2012 19:07, Alexander Lehmann wrote: > If you are using Windows, make sure that you use the correct char > encoding when copying resources in Maven (utf-8 instead of the local > windows locale), if the story files are copied from src to the > target/classes dir, the files may get converted otherwise. This > doesn't happen in the IDE since it uses the story files in the source > dir. > > > On 17.04.2012 12:50, Augusto Rodriguez Caceres wrote: >> 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 > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email 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).
