if you are using eclipse, go to main preference and then Workspace.
there you could see the default text file encode being used by the
entire workspace.
you can check the encode used by one file selecting it and looking at
its properties...
regards,
Cristiano
On 10/01/13 10:45, Karlsson Christian wrote:
Hi
Yes, I’m using the resource file from jbehave jar-file. And it has the
\u00XX escape in the kwyword. I tried my own file as well but it
behavs the same way.
And, as far I can tell, I use UTF8 in the text files. I’ve tried
verifying this in eclipse as well as Notepad++. Any ideas on how to
really verify this?
Regards,
Christian
*Från:*Cristiano Gavião [mailto:[email protected]]
*Skickat:* den 10 januari 2013 14:15
*Till:* [email protected]
*Ämne:* Re: [jbehave-user] Problem localizing into Swedish
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
(which contains 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>