1

I have mapped static content (html) to external directory. When I request html file over HTTP, it returned content type/charset Windows-874.

Content-Type:text/html; charset=Windows-874

I would like to change it to

Content-Type:text/html; charset=UTF-8

How can I change it in 'ibm-web-ext.xml'? Or I have to change it in other configurations of Websphere?

Here is my ibm-web-ext.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-ext
   xmlns="http://websphere.ibm.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
      version="1.0">
   <file-serving-attribute name="extendedDocumentRoot" value="D:/XXX/content/" />

   <reload-interval value="3"/>
   <auto-encode-requests value="false"/>
   <auto-encode-responses value="false"/>
   <enable-directory-browsing value="false"/>
   <enable-file-serving value="true"/>
   <pre-compile-jsps value="false"/>
   <enable-reloading value="true"/>
   <enable-serving-servlets-by-class-name value="false" />  
</web-ext>
Floern
  • 33,559
  • 24
  • 104
  • 119
manassorn
  • 450
  • 3
  • 17
  • This is probably encoding in which file is saved. Check the actual file encoding using text editor e.g. Notepad++ or if you have files in Eclipse you can right click and select Properties. You may need to open and save files using different encoding. – Gas Sep 07 '14 at 11:54
  • @Gas I'm sure that the encoding of file is UTF-8. Because when I manually set charset at browser setting menu to UTF-8, It displayed UTF-8 text correctly – manassorn Sep 07 '14 at 14:11
  • Try to set jvm system property (via generic arguments) to `-Dclient.encoding.override=UTF-8` and see if it makes any difference – Gas Sep 07 '14 at 20:33
  • Check this link. It might be related: http://superuser.com/questions/239810/setting-utf8-as-default-character-encoding-in-windows-7 – groo Sep 08 '14 at 10:22

0 Answers0