Re: About JSP Page Encoding

2001-08-08 Thread Craig R. McClanahan

My understanding is that if you want properties files (and resource
bundles based on them) to be encoded correctly, you need to use the
native2ascii command line tool (comes with the JDK) to encode them
properly.

Craig


On Wed, 8 Aug 2001 [EMAIL PROTECTED] wrote:

 Hi All Developer
 
 I would like to ask a question about Tomcat's JSP page development problems
 
 The problems is related to the following set of properties files and
 contentType
 
 I have set the page contentType as TEXT/HTML;charset=UTF-8
 
 and read a properties files which is written by Microsoft Word using Save
 as encoding text utf-8
 
 the coding that I use to read the resource bundle is as normal.
 rb = ResourceBundle.getBundle(test);
 
 str_text = rb.getString(username_b5);
 
 out.print(str_text + BR);
 
 But the output is found to be unreadable result.
 
 after that my friend tell me to use
  out.println(new String(rb.getString(test).getBytes(ISO-8859-1),
 UTF-8));
 the result is readable.
 I would like to ask can I change some JVM default encoding such that I can
 use the default method to read the properties files.
 
 Samuel
 
 
 
 




About JSP Page Encoding

2001-08-07 Thread samuel . tsang

Hi All Developer

I would like to ask a question about Tomcat's JSP page development problems

The problems is related to the following set of properties files and
contentType

I have set the page contentType as TEXT/HTML;charset=UTF-8

and read a properties files which is written by Microsoft Word using Save
as encoding text utf-8

the coding that I use to read the resource bundle is as normal.
rb = ResourceBundle.getBundle(test);

str_text = rb.getString(username_b5);

out.print(str_text + BR);

But the output is found to be unreadable result.

after that my friend tell me to use
 out.println(new String(rb.getString(test).getBytes(ISO-8859-1),
UTF-8));
the result is readable.
I would like to ask can I change some JVM default encoding such that I can
use the default method to read the properties files.

Samuel