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.
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