title: Strange behaviour with € (euro character) in my JSP webpage
body: <p>I'm developing a spring web application with Apache tomcat 6, Java, JSP and Oracle.</p>
  
  <p>In the website you can upload some files. These files could have special characters in their name (as á, Ó, € (euro symbol), #...). 
  The following problem is when the files has the <strong>euro symbol</strong> (the Á, ó, etc. are working ok).</p>
  
  <p><strong>In brief</strong></p>
  
  <p>When I upload these files with the default encoding, they are not properly stored at database and filesystem, but their name are properly shown at the JSP (only in some places, not everywhere). When I upload them using the CP850 encoding, then they're stored properly at database and filesystem, but their name is not properly shown in the JSP place where they were ok.</p>
  
  <p><strong>Detail</strong></p>
  
  <p>I'm processing the upload with spring's CommonMultipartResolver, using the following configuration at app-config.xml :</p>
  
  <pre><code>&lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;!-- one of the properties available; the maximum file size in bytes (2097152 B = 2 MB) --&gt;
      &lt;property name="maxUploadSize" value="1073741824"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The names of the files are shown in 2 different places in my JSP, using jQuery. This is the first place:</p>
  
  <pre><code>            &lt;display:table name="${listDocuments}" requestURI="" id="documents" class="tableResult2" pagesize="10"&gt;
                  &lt;display:column titleKey="folderForm.name" class="dossierCodeCell" style='width: 250px;max-width: 250px;'&gt;
                      &lt;a href="&lt;c:url value="downloadDoc.html?id=${documents.id}&amp;version=${documents.version}"/&gt;"&gt;${documents.name}&lt;/a&gt;
                  &lt;/display:column&gt;
                  &lt;display:column titleKey="folderForm.userModification"  style="width:70px" 
                      property="lastModificationUser" class="dossierCodeCell" /&gt;
                  &lt;display:column titleKey="folderForm.modificationDate"  style="width:120px" 
                      property="lastModificationDate" class="dossierCodeCell" /&gt;
              &lt;/display:table&gt;
  </code></pre>
  
  <p>${display.name} is where I get the name of the file.</p>
  
  <p>And the second place is:</p>
  
  <pre><code>&lt;table width="100%"&gt;
      &lt;tr&gt;
          &lt;td width="50%"&gt;
              &lt;label style='display: inline;' class='fieldTitle'&gt; 
                  &lt;b&gt;&lt;fmt:message key='folderform.MainHeader' /&gt;&lt;/b&gt;
              &lt;/label&gt; 
              &lt;label style="display: inline;" class='fieldTitle'&gt; &lt;c:out value="${parentFolderName}"&gt;&lt;/c:out&gt;
              &lt;/label&gt;
          &lt;/td&gt;
          &lt;td width="50%"&gt;
              &lt;label style='display: inline;' class='fieldTitle'&gt; 
                  &lt;b&gt;Documento:&lt;/b&gt;
              &lt;/label&gt; 
              &lt;label style="display: inline;" class='fieldTitle'&gt;&lt;/label&gt;
              &lt;label style="display: inline;" class='fieldTitle' id="editFileName"&gt;&lt;/label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Here, I'm dinamically showing the document name at .editFileName label, using the following jQuery code when clicking some button:</p>
  
  <pre><code>$('.editDocRow').live('click', function() {
              var params = {};
  
              params.fileId = $(this).find(".fileId").val();
  
              $.getJSON("GetFileInfo.html", params, function(data) {
  
                  uploadfileBoxy = new Boxy(htmlPopupEditFiles, {
                      title : "&lt;fmt:message key='button.updloadDocumentVersion'/&gt;",
                      unloadOnHide : true,
                      modal : true
                  });
  
                  **$("#editFileName").html(data.fileName);**
  
              })
  
          });
  </code></pre>
  
  <p>Using this default configuration, the filename is not properly converted when it contains some special character (while debugging, you can't see the correct characters): in database (using SQLDeveloper) is not shown ok, in filesystem it's not stored ok, in the first JSP place it IS stored ok, but in the second JSP place it is NOT showing ok.</p>
  
  <p>However, if I change the default charset for the commonsMultipartResolver with:</p>
  
  <pre><code>&lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;!-- one of the properties available; the maximum file size in bytes (2097152 B = 2 MB) --&gt;
      &lt;property name="maxUploadSize" value="1073741824"/&gt;
      &lt;property name="defaultEncoding" value="Cp-850"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Then, it's stored ok at database and in filesystem, it's NOT showing ok at the first JSP place and it IS showing ok at the second place. So, here, the only problem is showing the name in the first JSP place.</p>
  
  <p>I'm using the following encoding for my html pages:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/&gt;
  </code></pre>
  
  <p>I've tried to change this charset with no success.</p>
  
  <p>Any help? Thanks</p>
  
  <p><strong>Update</strong></p>
  
  <p>It seems my whole application is not taking the correct charset for the € symbol. When creating a company with the € symbol in its name (in another webpage), although it's showing ok at the JSP, the € symbol is not storing correctly at database. What could I do?</p>