• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to convert a string in UTF-8 encoding format in javascript function

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


I am trying to alert one message which is in spanish language. In properties file the message is stored like this "No se encontraron resultados. Intenta realizar otra búsqueda.", but I want the message to come like this "No se encontraron resultados. Intenta realizar otra búsqueda".
In jsp file the message is getting fetched from properties file and coming absolutely fine but, when I am trying to alert the same in javascript file then it is coming as "No se encontraron resultados. Intenta realizar otra búsqueda." which is incorrect.
I think the javascript file is not supporting the UTF-8 encoding format so it is not be able to alert the correct format.
Please someone suggest me that how to do this this type of encoding in javascript function.



Thanks in advance:)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic