HTML files from different sources often have different encodings, so you may have to change this setting repeatedly. Now when you add HTML files to calibre they will be correctly processed. To do this go to Preferences → Advanced → Plugins → File type and customize the HTML to ZIP plugin, telling it what encoding your HTML files are in. When adding HTML files to calibre, you may need to tell calibre what encoding the files are in.
The command-line tools have an ebook-convert-txt-input -input-encoding option. This can be done in the GUI via the Input character encoding field in the Look & feel → Text section of the conversion dialog. Knowing the encoding of the source file: calibre tries to guess what character encoding your source files use, but often, this is impossible, so you need to tell it what encoding to use. How do I convert my file containing non-English characters, or smart quotes? ¶ There are two aspects to this problem: