Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding of index.html file in UTF-8 #485

Closed
krunal2450 opened this issue Nov 7, 2016 · 5 comments

Comments

@krunal2450
Copy link

commented Nov 7, 2016

I am packaging an application using html-webpack-plugin. Everything is going fine but index.html is getting generated in ANSI format. This is causing the extra junk characters (like Â) in my html page UI.
I resolved this issue using the help from below post:
http://stackoverflow.com/a/11325511/1606668

But I don't want to follow these steps manually. Is there anything in the parameter below template in below code?
new HtmlWebpackPlugin({
template: 'src/index.html'
});

I have tried using encoding: 'utf-8', but it is not working for me. Please let me know if anybody has any idea for this.

@jantimon

This comment has been minimized.

Copy link
Owner

commented Nov 11, 2016

Sorry only utf8 is supported by now - UTF8 has become the standard for web and it would be a lot of work to maintain other encondings.

@jantimon jantimon closed this Nov 11, 2016

@krunal2450

This comment has been minimized.

Copy link
Author

commented Nov 11, 2016

@jantimon Yes, you are right. But my question is:
Index.html file generated by html-webpack-plugin is in ANSI format by default. I want it to be generated in UTF-8 format with the configuration.

@jantimon

This comment has been minimized.

Copy link
Owner

commented Nov 11, 2016

Well the file generation is done by webpack - not by this plugin.
It happens here:

https://github.com/ampedandwired/html-webpack-plugin/blob/master/index.js#L179-L185

@krunal2450

This comment has been minimized.

Copy link
Author

commented Dec 20, 2016

Let me check that. Thanks for your important input @jantimon :)

@lock

This comment has been minimized.

Copy link

commented May 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.