| Locale-Sensitive Java Methodjavax.servlet.ServletResponse
public void setLocale(Locale locale)
 Internationalization (I18n) Method OverviewThis method sets the locale of the http response as well as the response's 
		character encoding if the character encoding has not already been explicitly set 
		using  setContentType(String type)
		or
		setCharacterEncoding(String encoding)and if
		ServletResponse.getWriterhasn't been called yet. If the web application's 
		deployment descriptor contains a locale-encoding-mapping-list element,
		and that element provides a mapping for the given locale, that mapping is used.
		Otherwise, the mapping from locale to character encoding is container dependent. In servlet 2.2 environments, the setLocalemethod generally maps the specified
            	locale to a native character encoding that is not Unicode. The following call
 
		 response.setLocale(new Locale("ja_JP"));
		results in a character set of Shift_JIS, which was a common, pre-Unicode encoding used on
		Japanese systems and provides an encoding for all Japanese characters.
 I18n IssuesIt is recommended I18n practice to use the UTF-8 character encoding for web content in order to ensure
		support for all languages. Because setLocaleencodes the data using a non-Unicode
                encoding unless otherwise specified in the web application's deployment descriptor, it is recommended that developers
		replace these calls with a call that explicitly sets the encoding to UTF-8, such assetCharacterEncoding. Suggested ReplacementInstead of:
 response.setLocale(localeObject);
		
 Use: 
		response.setCharacterEncoding("UTF_8");
		
 Locale-Sensitive Java Methods    
 |