shuber      2005/04/05 14:50:29 CEST

  Modified files:        (Branch: JAHIA-4-1-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.3.2.4  +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.3.2.3&r2=1.57.2.3.2.4&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.3.2.3
  retrieving revision 1.57.2.3.2.4
  diff -u -r1.57.2.3.2.3 -r1.57.2.3.2.4
  --- JahiaAdministration.java  24 Mar 2005 16:05:01 -0000      1.57.2.3.2.3
  +++ JahiaAdministration.java  5 Apr 2005 12:50:29 -0000       1.57.2.3.2.4
  @@ -1,4 +1,4 @@
  -// $Id: JahiaAdministration.java,v 1.57.2.3.2.3 2005/03/24 16:05:01 shuber 
Exp $
  +// $Id: JahiaAdministration.java,v 1.57.2.3.2.4 2005/04/05 12:50:29 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