Make Tidy leave my special chars untouched with utf-8?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Make Tidy leave my special chars untouched with utf-8?

Postby FrankC » Wed Sep 07, 2011 10:58 pm

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 &eacute; (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 &eacute;), which is good because that is the only way of reliable rendering. But it will leave &eacute; 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.
FrankC
 
Posts: 126
Joined: Thu Aug 18, 2011 3:28 pm

Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: No registered users and 10 guests

cron