[Issue 2026] New - Non ASCII chars get mangled when a new user is created

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 2026] New - Non ASCII chars get mangled when a new user is created

jiai
https://hudson.dev.java.net/issues/show_bug.cgi?id=2026
                 Issue #|2026
                 Summary|Non ASCII chars get mangled when a new user is created
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|Windows XP
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|gui
             Assigned to|issues@hudson
             Reported by|jiai






------- Additional comments from [hidden email] Sun Jul  6 09:31:58 +0000 2008 -------
Non ASCII chars get mangled when a new user is created.
Sample name: äöüß becomes äöüß (ok, this is extreme for usernames, but at
least full names must be enabled to have non ASCII characters).

It is one of the common problems when running an application server on Windows:
the default charset of the server is cp1252, the charset of the web application
is UTF-8. When you don't take care of this, you'll get in trouble.

There is a puzzling effect: After you edit the name as an administrator, the non
ASCII chars are correctly displayed!

Another effect is, that the user list becomes longer and longer whith entries like:
äöüß
äöüß
äöüß

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 2026] Non ASCII chars get mangled when a new user is created

Kohsuke Kawaguchi
Administrator
https://hudson.dev.java.net/issues/show_bug.cgi?id=2026



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |INVALID
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Mon Jul 21 03:38:09 +0000 2008 -------
I couldn't reproduce this.

This is probably because you run Hudson on a servlet container that doesn't
handle encoding correctly. Starting 1.228, Hudson checks this and produeces a
warning (see the changelog for 1.228 for details), so if you are using an older
version, please check this.

Tomcat is perhaps the prime example of this. See
http://hudson.gotdns.com/wiki/display/HUDSON/Tomcat for more details about
Tomcat and encoding.

If your case doesn't apply to any of the above, please let us know your
container and Hudson version.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 2026] Non ASCII chars get mangled when a new user is created

jiai
In reply to this post by jiai
https://hudson.dev.java.net/issues/show_bug.cgi?id=2026



User jiai changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |REOPENED
--------------------------------------------------------------------------------
              Resolution|INVALID                   |
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Mon Jul 21 17:29:56 +0000 2008 -------
My case doesn't apply: Tomcat showed the warning which you described, I inserted
the attribute URIEncoding="UTF-8". But there is no change, the warning vanished
but non-ASCII-characters are mangled further on.

My configuration is:
- Hudson 1.236
- Tomcat 6.0.14 (Using port 9090 directly, 8080 is used by another application)
- JRE/JDK (most likely) 1.6.0_02
- Windows Server 2003, Charset cp1252 operating system in english, language
version non unicode programs will use: english


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 2026] Non ASCII chars get mangled when a new user is created

sogabe-2
In reply to this post by jiai
https://hudson.dev.java.net/issues/show_bug.cgi?id=2026






------- Additional comments from [hidden email] Tue Jul 22 09:03:05 +0000 2008 -------
Reproducable on Glassfish.

the following patch maybe fix this.


Index: HudsonPrivateSecurityRealm.java
===================================================================
--- HudsonPrivateSecurityRealm.java (revision 10950)
+++ HudsonPrivateSecurityRealm.java (working copy)
@@ -79,6 +79,7 @@
      * Creates an user account. Used for self-registration.
      */
     public void doCreateAccount(StaplerRequest req, StaplerResponse rsp) throws
IOException, ServletException {
+        req.setCharacterEncoding("UTF-8");
         if(!allowsSignup()) {
             rsp.sendError(SC_UNAUTHORIZED,"User sign up is prohibited");
             return;

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]