Warning message does not display correctly

I want to display the following message in French

for example: Rack(s) [...]ne peut pas être déclaré HS.

but I get Rack(s) [...] ne peut pas e darHS .

here some characters are not displayed as écl , é .

I am using a warning tag to display a message.

I already used the Unicode character in the message.properties file.

below is my code. help help

 else if (screenName.equals(...)) { return "Rack [" + ErrorMessage + "] " + getResourceValue("message.info.popup.rackscrap", locale); 

and in the .properties posts I used

 message.info.popup.rackscrap= ne peut pas être d\u00e9clar\u00e9 HS` 

and I use an AJAX call to display a message

 var error = item.error; if(error!="") alert('ERROR ' + error); 

The message does not appear in the warning, showing some garbage letter or not laying out a special character, for example, é, l ', ..

+6
source share
1 answer

This will help if you split the ajax controller code.

I had a similar problem, and I solved it by assigning the encoding in the response.

See below source code:

 response.setCharacterEncoding("UTF-8"); 
0
source

All Articles