On Monday, March 7, 2011, Kim Mosley <[email protected]> wrote:
What I'd like is for the unicodes to be let alone when I use Tidy. It
seems that is the only way for browsers to display the right
character. Is there a way to use Tidy, and not have the code of the
page altered (the unicodes converted to their actual character)?
First: I think there's a terminology problem here that is mixing
things up. :-)
It sounds like you're using the term "unicodes" to refer to HTML
entities: they begin with an ampersand, have a few numeric
characters (or sometimes a name), and end with a semicolon. For
example: "—" or "©". "Unicode" has a specific
meaning, and it's something else entirely. :-)
Second: Note that Tidy does many things, and converting entities
to actual Unicode characters is one of them. Depending on why
you're using Tidy, this can either be a help, or a nuisance.
Tidy isn't just a pretty printer: part of what it does is
rewrite your code in ways that it thinks are appropriate -- even
if you don't. :-)
Third: If Tidy is converting entities to actual characters, and
they are displaying incorrectly in the browser, then your
document either has an incorrect character set declaration, or
the web server is misconfigured and providing the document in
the wrong character set. If you're simply previewing the
documents and you observe incorrect display, than a missing or
incorrect character set declaration is the most likely explanation.
Finally: if you're simply trying to pretty-print your code, the
built-in formatters (not Tidy) are the way to go. (See the
formatter commands on the Utilities submenu of the Markup menu.)
The formatters will change the layout of your code, but will not
perform entity conversion or any other content transformations.
The "Pretty Print" option is probably your best bet.
R.
--
Rich Siegel Bare Bones Software, Inc.
<[email protected]> <http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they
sedate me.
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>