No internet connection
  1. Home
  2. Support

charset - utf ...

By wiso @wiso2018-12-23 12:34:43.810Z

i have a problem with the german characters.
after crawling my site looks like that:

but should look like that:

but if i look in the "index.html" there is the right utf charset, i think:

html lang="de-DE"...head><meta charset="UTF-8".....meta http-equiv="X-UA-Compatible" content="IE=edge"....script type="text/javascript"....

where can i find the mistake? what is the solution?
would be great if someone has a hint for me,
thank you and best regards,

  • 17 replies
  1. B
    @bjoernbg2019-11-26 10:58:39.978Z

    Hi, thanks for this great plugin – I'm only just starting to use it but it looks very promising!

    With my website being in German I had the same issues as the others here and was able to fix it with changing one line in the PHP:

    Inwp-content/plugins/static-html-output-plugin/plugin/WP2Static/HTMLProcessor.phpreplace this line


    with this:

        mb_convert_encoding( $this->raw_html, 'HTML-ENTITIES', 'UTF-8' )

    This solved the issue for me. The solution is based on a change made by the author in the dev version, so hopefully the next version will work out of the box!

    1. S@segedy2019-12-04 21:33:29.368Z

      This was very helpful, thanks. I implemented the same patch to the plugin code and that took care of our character encoding issues.

      1. In reply tobjoernbg:
        GGerhard H @geho2020-02-16 21:12:00.915Z

        Thanks a lot for the fix!
        After updating "HTMLProcessor.php" with the proposed fix German Umlauts work nicely.
        FYI: MySQL tables have char fields defined with Collation = "utf8mb4_unicode_520_ci"
        (WP database tables have been created automatically by the WordPress installer)

      2. In reply towiso:
        Leon Stafford @leonstafford2018-12-23 15:50:43.869Z

        Hi @wiso,

        It looks like this issue here:

        Could you please add to that issue or on this forum, a sample snippet of code from your WordPress site's source and this static copy's source (ie, View Source from right-click within your browser).

        That will help me have some samples to work a solution for.

        1. H
          In reply towiso:
          mac @huji2019-01-16 14:49:38.436Z

          hi Leon, I have the same problem, how can I solve this problem, it is very urgent.

          1. Leon Stafford @leonstafford2019-01-23 03:04:11.308Z

            Hi @wiso, @huji,

            Please try this latest preview release, which adds a fix for UTF-8 encoded pages:


            Most WordPress themes should have this included, else ensure this is in your HTML code, else the plugin doesn't properly handle the encodings:

            <meta charset="utf-8" />

            1. K@KajMagnus2019-01-26 00:30:22.870Z

              That links is broken? Maybe you meant: and clicking the "Latest release" green text? results in version 6.3 released a few days ago. @huji

              1. Leon Stafford @leonstafford2019-01-26 01:59:41.275Z

                Thanks for that, @KajMagnus :)

                Let's touch base again soon.

                @huji, please let me know if any further issues.

          2. W
            In reply towiso:
            Woah @woah2019-02-04 17:59:30.249Z

            Same problem here... Tried the latest release ( 6.6.2 ) but it isn't working.

            1. W
              In reply towiso:
              Woah @woah2019-02-05 09:25:17.248Z

              I have checked Slack too, but there are no solutions yet?
              We are running this on a big live site but all text is now f*cked..

              1. W
                In reply towiso:
                Woah @woah2019-02-12 12:57:47.267Z

                Anyone already has fixxed this? Just checking last time otherwise will move on :)

                1. Leon Stafford @leonstafford2019-02-12 22:32:15.325Z

                  Hi @woah,

                  It's likely down to a combination of your database encoding, the encoding used when entering the content and any other conversion steps throughout the process.

                  It's not something I can quickly troubleshoot with some back and forth over emails/forum, but if you would like to hire me for a few hrs, I can take a look at it for you.

                  Alternatively, you may try to do the static conversion with HTTrack and some scripts for rewriting URLs, that may have better support for the encoding used.



                  1. WWoah @woah2019-02-13 08:05:35.073Z

                    Thanks for your reply Leon. All clear.. What about the root problem? If we can't run in root i know enough and we will just move on.

                    1. Leon Stafford @leonstafford2019-02-13 08:39:05.515Z

                      can't run in root

                      ^ not clear what that means. Unrelated to the UTF-8 issue?

                2. W
                  In reply towiso:
                  Woah @woah2019-02-19 08:24:18.295Z

                  "root" --> Main folder. Running as the live website. Yes unrelated but the UTF-8 still here too.

                3. S
                  In reply towiso:
                  @staticgen2019-09-24 08:52:45.958Z

                  I ran into the same problem with german umlauds on a page hosted on
                  I made a test installation for debugging on another hoster, problem gone.
                  It seems database encoding or interaction between wordpress/plugin/database causes this problem.

                  This problem is also persistent with the latest version 7 build of the plugin.

                  If someone from the dev team wants to have a look, please pm me.
                  I can give you access to the test installations for debugging.
                  Would be really nice to resolve this.