tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amy Roh <amy...@apache.org>
Subject Re: [PATCH] improve internationalization for admin tool
Date Mon, 12 Aug 2002 23:50:54 GMT
Hi Takashi,

Takashi Okamoto wrote:
> Hi tomcat, (especially amy)
> 
> This is the second patch to internationalize the admin tools. First
> patch was commited by amy. New patch will improve at following point:
> 
> 	+ store file with utf-8 encoding and add encoding='utf-8' at
> 	  xml header.
> 
> 	+ use filter servlet to decode post and get parameters.
> 	  (you have to include SetCharacterEncodingFilter in admin web
> 	   application with this patch)

SetCharacterEncodingFilter isn't included in your patch.  Can you submit 
that as well?

Thanks,
Amy

> 
> Could you apply this patch?
> 
> regards,
> 
> 
> Takashi Okamoto
> 
> 
> ------------------------------------------------------------------------
> 
> diff -uNr orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
> --- orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
Wed Jul 24 00:06:44 2002
> +++ jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/core/StandardServer.java
Sun Aug  4 00:18:37 2002
> @@ -71,6 +71,8 @@
>  import java.beans.PropertyDescriptor;
>  import java.io.File;
>  import java.io.FileWriter;
> +import java.io.FileOutputStream;
> +import java.io.OutputStreamWriter;
>  import java.io.InputStream;
>  import java.io.IOException;
>  import java.io.PrintWriter;
> @@ -742,7 +744,7 @@
>          // Open an output writer for the new configuration file
>          PrintWriter writer = null;
>          try {
> -            writer = new PrintWriter(new FileWriter(configNew));
> +            writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(configNew),
"UTF8"));
>          } catch (IOException e) {
>              if (writer != null) {
>                  try {
> @@ -1916,6 +1918,7 @@
>                               Server server) throws Exception {
>  
>          // Store the beginning of this element
> +        writer.println("<?xml version='1.0' encoding='utf-8'?>");
>          for (int i = 0; i < indent; i++) {
>              writer.print(' ');
>          }
> diff -uNr orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
> --- orig/jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
Wed Jul 24 00:06:44 2002
> +++ jakarta-tomcat-4.1.8-src/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java
Sun Aug  4 01:09:29 2002
> @@ -506,11 +506,11 @@
>  
>              // Configure our PrintWriter
>              FileOutputStream fos = new FileOutputStream(fileNew);
> -            OutputStreamWriter osw = new OutputStreamWriter(fos);
> +            OutputStreamWriter osw = new OutputStreamWriter(fos, "UTF8");
>              writer = new PrintWriter(osw);
>  
>              // Print the file prolog
> -            writer.println("<?xml version='1.0'?>");
> +            writer.println("<?xml version='1.0' encoding='utf-8'?>");
>              writer.println("<tomcat-users>");
>  
>              // Print entries for each defined role, group, and user
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message