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

  Modified files:
    core/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.10      +12 -1     
jahia/core/src/java/org/jahia/bin/JahiaAdministration.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/bin/JahiaAdministration.java.diff?r1=1.9&r2=1.10&f=h
  
  
  
  Index: JahiaAdministration.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/bin/JahiaAdministration.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JahiaAdministration.java  7 Mar 2005 17:49:17 -0000       1.9
  +++ JahiaAdministration.java  5 Apr 2005 12:50:56 -0000       1.10
  @@ -1,4 +1,4 @@
  -// $Id: JahiaAdministration.java,v 1.9 2005/03/07 17:49:17 shuber Exp $
  +// $Id: JahiaAdministration.java,v 1.10 2005/04/05 12:50:56 shuber Exp $
   //
   //                                   ____.
   //                       __/\ ______|    |__/\.     _______
  @@ -197,6 +197,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