this seems to be related to the encoding.
are you using UTF-8 in your text file ?
have you escaped to unicode the "ä" letter in the resource file ?
regards,
Cristiano
On 10/01/13 10:05, Karlsson Christian wrote:
Hi all
I’m in progress of localizing our JBehave setup into Swedish.
I follow the instructions on
http://jbehave.org/reference/stable/stories-in-your-language.html
(whichcontains error by the way, it seems that you need a new
ExamplesTableFactory in the examplesTableConverter).
I use the resource bundle in i18n package of jbehave-core.
I create my LocalizedKeywords class and have my story file in Swedish.
Tests recognize key words "Givet" and "Och" but then when we get to
the "När" it’s freaking out.
My story file is like:
Scenario: Complete handling of _lärarleg_ case
_Givet_user _testfir_ has logged in
_Och_a categorizing case with id 123456 exists
_När_case 123456 is selected
!-- _Så_ the task details should be displayed
The output from mvn verify is:
Givet user testfir has logged in
Och a categorizing case with id 123456 exists
N├ñr case 123456 is selected (V─NTANDE)
!-- Så the task details should be displayed
@Given("a categorizing case with id 123456 exists\r\nN\u00C3\u00A4r
case 123456 is selected")
@Pending
public void
givenACategorizingCaseWithId123456ExistsNärCase123456IsSelected() {
// V─NTANDE
}
The keywords file contains
When=N\u00E9r
So is this a file encoding issue, i.e. I have ISO-8859-1 where it’s
supposed to be UTF-8, or is there something else I’ve missed?
Steps classes contain
@Given("user $userId has logged in")
@Alias("användare $userId är inloggad")
*public**void*login(String userId) {
}
@Given("ett kategoriseringsärende med id $id finns")
@Alias("a categorizing case with id $id exists")
*public**void*setupCategoryCase(String id) {
}
@When("case $id is selected")
@Alias("ärende $id väljs")
*public**void*chooseCase(String id) *throws*IOException {
}
Best regards,
Christian
**
*Christian Karlsson*
CAG Contactor AB
Adress: Jan Stenbecks Torg 17, SE-164 40 Kista
Mobil: +46 (0)706694527
Mail: christian.karlsson <at> cag.se
www.cag.se
<https://wmail.cag.se/owa/redir.aspx?C=G2EjVQkj7kGZyieqy24uGB6NV2uAkM9Iy3xqV4cZFUaEVGXCGlWIq_V5O25t1jIUtjHgAaGFl0U.&URL=http%3a%2f%2fwww.cag.se%2f>