Git Product home page Git Product logo

Comments (5)

w-explorer avatar w-explorer commented on June 8, 2024

这个不怪作者,这个是你们的项目没有过滤字符集。亲测

from swagger2word.

xiangshenb avatar xiangshenb commented on June 8, 2024

我的理解是这个程序处理的是json文件而已,json里的中文并没有乱码,经过程序处理之后页面上对应的中文变成乱码了

from swagger2word.

SmileLifeIven avatar SmileLifeIven commented on June 8, 2024

在 word.xml (src\main\resources\templates\word.html) 文件里添加编码方式 charset=utf-8

<meta http-equiv="Content-Type" content="application/msword; charset=utf-8"/> // 这里末尾添加
<title>toWord</title>
<style type="text/css">

from swagger2word.

bigseek avatar bigseek commented on June 8, 2024
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

在pom文件 properties节点 添加一下字符集的配置试试,我是win10 64的环境,可以解决

from swagger2word.

Zhang-Hongda avatar Zhang-Hongda commented on June 8, 2024

如果是在IDEA直接运行工程,IDEA会自动加入JVM参数-Dfile.encoding=UTF-8 -jar,中文不会乱码
打包成的话,运行前也加入此参数即可:

java -jar -Dfile.encoding=UTF-8 Swagger2Word-exec.jar

from swagger2word.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.