Changeset 848


Ignore:
Timestamp:
Jun 30, 2005, 11:15:42 AM (17 years ago)
Author:
Nicklas Nordborg
Message:

Added the possibility to use unicode in the database and web client

Location:
trunk
Files:
3 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/servlet/Download.java

    r693 r848  
    133133      String mimeType = forceMimeType != null ? forceMimeType : f.getMimeType();
    134134      mimeType = mimeType != null ? mimeType : defaultMimeType;
    135       // TODO - fix this so it works with both download and view
    136135      response.setContentType(mimeType);
    137136      if (download) response.setHeader("Content-Disposition", "attachment;filename="+f.getName());
  • trunk/src/core/net/sf/basedb/util/XMLUtil.java

    r791 r848  
    2424*/
    2525package net.sf.basedb.util;
    26 
    2726
    2827import java.io.InputStream;
     
    6362
    6463  /**
    65     Convert a <code>Document</code> to xml. The encoding is set to ISO-8859-1.
     64    Convert a <code>Document</code> to xml. The encoding is set to UTF-8.
    6665    @param dom The document
    6766    @return The XML
     
    6968  public static String toXml(Document dom)
    7069  {
    71     XMLOutputter out = new XMLOutputter(Format.getCompactFormat().setEncoding("ISO-8859-1"));
     70    XMLOutputter out = new XMLOutputter(Format.getCompactFormat().setEncoding("UTF-8"));
    7271    return out.outputString(dom);
    7372  }
  • trunk/www/WEB-INF/web.xml

    r672 r848  
    2929
    3030<web-app>
    31   <display-name>BASE</display-name>
    32   <description>
    33      Welcome to BASE
    34   </description>
     31  <display-name>BASE</display-name>
     32  <description>
     33    The BASE 2 web application.
     34  </description>
     35 
    3536  <error-page>
    3637    <exception-type>java.lang.Throwable</exception-type>
    3738    <location>/exception/exception.jsp</location>
    3839  </error-page>
     40 
     41  <!-- The View servlet used to download files in view mode -->
    3942  <servlet>
    4043    <servlet-name>view</servlet-name>
     
    4851  </servlet>
    4952
     53  <!-- The Download servlet used to download files in download mode -->
    5054  <servlet>
    5155    <servlet-name>download</servlet-name>
     
    7175    <url-pattern>/my_base/files/view/*</url-pattern>
    7276  </servlet-mapping>
    73 
     77 
     78  <!-- A filter that sets the character encoding on all *.jsp files -->
     79  <filter>
     80    <filter-name>characterEncoding</filter-name>
     81    <filter-class>net.sf.basedb.clients.web.servlet.CharacterEncodingFilter</filter-class>
     82    <init-param>
     83      <param-name>characterEncoding</param-name>
     84      <param-value>ISO-8859-1</param-value>
     85      <!--
     86      <param-value>UTF-8</param-value>
     87      -->
     88    </init-param>
     89  </filter>
     90 
     91  <filter-mapping>
     92    <filter-name>characterEncoding</filter-name>
     93    <url-pattern>*.jsp</url-pattern>
     94  </filter-mapping>
    7495
    7596</web-app>
  • trunk/www/include/scripts/table.js

    r825 r848  
    2828  @version 2.0
    2929*/
    30 
    3130var Table = new TableClass();
    3231function TableClass()
     
    297296      frm.quickvalue.value = frm.quickvalue_string.value;
    298297    }
     298    //frm.action = "test.jsp";
    299299    frm.submit();
    300300  }
Note: See TracChangeset for help on using the changeset viewer.