Garbled characters appear when exporting EXCEL (HTML format) in JSP

Source: Internet
Author: User

The problem encountered in reality is: Export EXCEL 1. Use UTF-8 encoding only output header, no output data, garbled; when there is data output, it will not garbled. 2. Use GB2312 encoding output with the UTF-8 on the contrary, there are data garbled, only the header is not garbled. Jsp page code: Jsp code: <% @ page language = "java" contentType = "text/html; charset = UTF-8" %> HTML code: Html code: <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"> cause: the generated EXCEL file is HTML not JSP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.