Hi,
I've already tried all setting combinations I can logically think of, but cannot get it done. How do I get Tidy to leave my special chars untouched, with a utf-8 charset? It keeps changing them to codes that at best are unworkable. Even if I already have them converted to entities, and only click the option Indent HTML tags! Very frustrating.
I need utf-8 as charset for the XAMPP PHP rendering to function properly. And it is the recommended standard.
---------------------------------------------------------------------------
Edit: I've found a work-around for it:
* Include a utf-8 charset meta-tag in the head: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />. This way, you can type special characters either as é (but rendered correctly only if the page is made with WB[!?]) or as é (always rendered correctly).
* Tidy > Configure Tidy > Validate and Fix HTML > Edit...
* Under Character Encoding, set 'char' and 'output' to ascii, and set 'input' to utf-8.
* Click OK and Close. Run Tidy.
* Tidy will change special characters to entities (é to é), which is good because that is the only way of reliable rendering. But it will leave é alone if that was in the code already.
* Tidy will also change the charset meta-tag to us-ascii. Change that back to utf-8 manually.
* Done. This way, you can run Tidy more than once, which would previously result in unworkable or plain invalid converted code snippets. And the result validates.
This is a Tidy problem by the way, not a WB problem -- I'm having the same difficulties with Tidy in another code editor. It would be nice though if folks at WB would ask the makers of Tidy to -- finally! -- come up with a version without this frustrating behavior. Because this has been going on for years, so I learned from the Tidy bug report website.