Wednesday, June 23, 2010

Applying Character code in java

Setting Character coding in Java for web applications:

HttpServletRequest request=null;
String charEncoding = "UTF-8"; //Can be taken from some configuration files too.

if(request.getCharacterEncoding() == null)
request.setCharacterEncoding(charEncoding);

No comments:

Post a Comment