Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default encoding in spring.

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen the following code to set default-encoding in spring:



But can any body tell me how to it in following pattern:



I have tried p:defaultEncoding="UTF-8" but it does not work.
 
Brian Murphy
Author
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Pawan,

Do you get an error of some sort? The syntax you're suggesting does indeed work. Here's what it would look like.



Also note that you have to use unicode escapes to get UTF-8 support, or switch to using the XML format for message bundles. You can read more in the Properties JavaDocs - http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/java/util/Properties.html

Cheers,

Brian D. Murphy
@brimurph
 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Brian....We were busy in some other work for 2 months. So couldn't look into it. now I ahve got the solution thanks to you. What I have noticed that with ReloadableResourceBundleMessageSource class we have to put classpath as prefix with basename property. This was the only problem. Thanks once again and sorry for such a late reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic