Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Encoding issue with i18n

Romain Pouclet May 7, 2014

Hi,

I'm working on a plugin that will be both in english and french, but the text in french is garbled. I'm using both velocity and soy templates.

Here is what I do in velocity:

<button id="blue-load-more-button">$i18n.getText('vendor.load_more')</button>

But here is the result : https://www.dropbox.com/s/z9mb8pys1dvgy83/Capture%20d%27%C3%A9cran%202014-05-08%2011.18.03.png

Same in Soy template :

<div><textarea class="textarea-reply" placeholder="{getText('vendor.reply.placeholder')}" id="{$status.id}" cols="130" wrap></textarea></div>

But here is the result :

https://www.dropbox.com/s/3k38gufma6glh56/Capture%20d%27%C3%A9cran%202014-05-08%2011.22.38.png

I tried to re-write my files with vim, forcing the encoding to utf-8 but the accents are still garbled.

Any idea ?

 

Thanks!

 

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2014
UTF-8 ? No, little paddawan, properties files in Java must be Ascii. Use native2ascii (the command line in Linux) and it will encode special characters for you. I recently found this answer on StackOverflow.

And welcome to the Atlassian ecosystem!
Romain Pouclet May 8, 2014

Congratulations, you've just won't a couple of drinks if you ever come to Montréal!

Thanks!

Romain Pouclet May 8, 2014

While we are talking about this property file, is there a trick to store a single quote? Trying to have "J'aime" but it always ends up as "Jaime"...

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2014

In what history may say was a terrible decision, the escape character in Java's MessageFormat syntax is actually the single quote, so you'd need to do two single quotes to print a literal single quote, eg. "J''aime".

TAGS
AUG Leaders

Atlassian Community Events