shuber      2005/04/05 14:45:35 CEST

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/java/org/jahia/bin JahiaAdministration.java 
  Log:
  Improving UTF-8 support in the administration.
  - Added code to force the character encoding to UTF-8 if the installation is 
in UTF-8
  
  Revision  Changes    Path
  1.57.2.6  +12 -1     jahia/src/java/org/jahia/bin/JahiaAdministration.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/bin/JahiaAdministration.java.diff?r1=1.57.2.5&r2=1.57.2.6&f=h
  
  
  
  Index: JahiaAdministration.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/bin/Attic/JahiaAdministration.java,v
  retrieving revision 1.57.2.5
  retrieving revision 1.57.2.6
  diff -u -r1.57.2.5 -r1.57.2.6
  --- JahiaAdministration.java  7 Mar 2005 17:27:51 -0000       1.57.2.5
  +++ JahiaAdministration.java  5 Apr 2005 12:45:35 -0000       1.57.2.6
  @@ -1,4 +1,4 @@
  -// $Id: JahiaAdministration.java,v 1.57.2.5 2005/03/07 17:27:51 shuber Exp $
  +// $Id: JahiaAdministration.java,v 1.57.2.6 2005/04/05 12:45:35 shuber Exp $
   //
   //                                   ____.
   //                       __/\ ______|    |__/\.     _______
  @@ -194,6 +194,17 @@
   
           Jahia.copySessionCookieToRootContext(request, response);
   
  +        if (jSettings != null) {
  +            if (jSettings.isUtf8Encoding()) {
  +                // bad browser, doesn't send character encoding :(
  +                // we can force the encoding ONLY if we do this call before 
any
  +                // getParameter() call is done !
  +                if (jSettings.getDefaultLanguageCode().indexOf("zh")==-1) {
  +                    request.setCharacterEncoding("UTF-8");
  +                }
  +            }
  +        }
  +
           // get the current user session...
           HttpSession session = request.getSession(true);
   
  

Reply via email to