Description
There seems to be an inconsistency to the way files are treated when they're being read (like the mustache templates) and when their being written (the processed files after applying the mustache template). When files are written back to disk UTF-8 is enforced, but when the mustache files are first read UTF-8 is not enforced and the default OS value is used instead, which seems to mess things up on Windows systems.
I think it would make sense to assume that the input files are UTF-8 since we're enforcing that charset when writing files.
Swagger-codegen version
master @ 0fb154e
Swagger declaration file content or url
Let's take the JavaSpring template, spring-boot library and modify the Readme.md file to something like:
Spring_Boot_Server
Command line used for generation
-t <new, modified template>
Steps to reproduce
- Generate code for the
JavaSpring language, spring-boot library using the new, modified template.
- The generated Readme.md file will not have the correct
Spring_Boot_Server text (at least on Windows systems) as the template was read using a different charset than UTF-8.
Description
There seems to be an inconsistency to the way files are treated when they're being read (like the mustache templates) and when their being written (the processed files after applying the mustache template). When files are written back to disk UTF-8 is enforced, but when the mustache files are first read UTF-8 is not enforced and the default OS value is used instead, which seems to mess things up on Windows systems.
I think it would make sense to assume that the input files are UTF-8 since we're enforcing that charset when writing files.
Swagger-codegen version
master @ 0fb154e
Swagger declaration file content or url
Let's take the JavaSpring template, spring-boot library and modify the Readme.md file to something like:
Spring_Boot_ServerCommand line used for generation
-t <new, modified template>Steps to reproduce
JavaSpringlanguage,spring-bootlibrary using the new, modified template.Spring_Boot_Servertext (at least on Windows systems) as the template was read using a different charset than UTF-8.