Open text file in browser tab in utf-8

There is this page where I give the user some links. Every link targets a text file. When the user clicks it just opens the text in the browser tab. How can I set the encoding to be utf8? The files are in utf8 but not showing like that.

Answers


If you mean text/plain files with .txt extension served by tomcat, you can

<mime-mapping>  
    <extension>txt</extension>  
    <mime-type>text/plain;charset=UTF-8</mime-type>  
</mime-mapping>

In your web.xml


Need Your Help

Mysql query where column has several values

php mysql search

I've been trying to find a way to get a value from a column using mysql query.

Jquery async call not working on user event

javascript php jquery ajax

In my webpage many on-load ajax call those works fine.