Discussion:
switching the coding of various symbols
Rob Stevenson
2008-05-08 19:04:07 UTC
Permalink
Hello,

I have dozens of HTML files which contain things like ” for
right double quote, and so on. I think this mess came out of an old
Word file conversion process. I now use a different process,
converting to the ” system, which I prefer, within BBEdit after
importing text from a Word file.

I know I can use Find/Replace for each matching pair to clean these
up but I think that a simple switch in BBEdit would be such a good
idea that it probably exists already. Can someone tell me where it
is? ;-)

Rob

"It's like those French have a different word for *everything*" -
Steve Martin
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Roland Küffner
2008-05-13 10:52:42 UTC
Permalink
Hi, Rob
Post by Rob Stevenson
I know I can use Find/Replace for each matching pair to clean these
up but I think that a simple switch in BBEdit would be such a good
idea that it probably exists already. Can someone tell me where it
is? ;-)
Yes.
Markup > Utilities > Translate (or Cmd+Opt+T)

Translate HTML to Text first. Then translate it again. Text to HTML.
You can choose the way that characters are encoded (by name, hex or
decimal)


greets
Roland
Post by Rob Stevenson
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Bob Rosenberg
2008-05-14 15:56:17 UTC
Permalink
Post by Roland Küffner
Hi, Rob
Post by Rob Stevenson
I know I can use Find/Replace for each matching pair to clean these
up but I think that a simple switch in BBEdit would be such a good
idea that it probably exists already. Can someone tell me where it
is?
Yes.
Markup > Utilities > Translate (or Cmd+Opt+T)
Translate HTML to Text first. Then translate it again. Text to HTML.
You can choose the way that characters are encoded (by name, hex or
decimal)
greets
Roland
While this may do the conversion of numeric entries to named ones, it
is overkill and does not preserve the HTML Markup. What was requested
was a way to scan the HTML for the numeric entries and make them
named (either automatically when you open the file or on a request
basis) without doing any other alteration to the HTML in the file.
--
Bob Rosenberg
RockMUG Webmaster
***@RockMUG.org
www.RockMUG.org
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Roland Küffner
2008-05-14 17:02:56 UTC
Permalink
Hi,
Post by Bob Rosenberg
Post by Roland Küffner
Hi, Rob
Post by Rob Stevenson
I know I can use Find/Replace for each matching pair to clean
these up but I think that a simple switch in BBEdit would be such
a good idea that it probably exists already. Can someone tell me
where it is?
Yes.
Markup > Utilities > Translate (or Cmd+Opt+T)
Translate HTML to Text first. Then translate it again. Text to
HTML. You can choose the way that characters are encoded (by name,
hex or decimal)
While this may do the conversion of numeric entries to named ones,
it is overkill and does not preserve the HTML Markup. What was
requested was a way to scan the HTML for the numeric entries and
make them named (either automatically when you open the file or on a
request basis) without doing any other alteration to the HTML in the
file.
perhaps I misunderstand the problem and apologize if my hint is not
helpful, but on translating from HTML to Text you can *un*check the
"Remove Tags" checkbox in the Translate dialog and your markup will
not be touched. Btw, the opposite funcionalty would be "Remove
Markup" (also under Markup > Utilities) which removes the markup but
leaves encoded entities alone.

-Roland
Post by Bob Rosenberg
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Rob Stevenson
2008-05-15 18:58:58 UTC
Permalink
Post by Roland Küffner
Post by Bob Rosenberg
Post by Roland Küffner
Post by Rob Stevenson
I know I can use Find/Replace for each matching pair to clean
these up but I think that a simple switch in BBEdit would be
such a good idea that it probably exists already. Can someone
tell me where it is?
Yes.
Markup > Utilities > Translate (or Cmd+Opt+T)
Translate HTML to Text first. Then translate it again. Text to
HTML. You can choose the way that characters are encoded (by
name, hex or decimal)
While this may do the conversion of numeric entries to named ones,
it is overkill and does not preserve the HTML Markup. What was
requested was a way to scan the HTML for the numeric entries and
make them named (either automatically when you open the file or on
a request basis) without doing any other alteration to the HTML in
the file.
perhaps I misunderstand the problem and apologize if my hint is not
helpful, but on translating from HTML to Text you can *un*check the
"Remove Tags" checkbox in the Translate dialog and your markup will
not be touched. Btw, the opposite funcionalty would be "Remove
Markup" (also under Markup > Utilities) which removes the markup
but leaves encoded entities alone.
Thanks Roland for the tip. I hadn't thought of doing the Translate
backwards and then forwards. Should work fine, as you say. I may be
back to ask how to do that for a fairly large number of files in one
swell foop, but I think I'd better RTFM first -- it's been a while
since I did that. ;-)

Rob
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Roland Küffner
2008-05-16 15:16:15 UTC
Permalink
Hi, Rob
Post by Rob Stevenson
Post by Roland Küffner
Post by Bob Rosenberg
Post by Roland Küffner
Post by Rob Stevenson
I know I can use Find/Replace for each matching pair to clean
these up but I think that a simple switch in BBEdit would be
such a good idea that it probably exists already. Can someone
tell me where it is?
Yes.
Markup > Utilities > Translate (or Cmd+Opt+T)
Translate HTML to Text first. Then translate it again. Text to
HTML. You can choose the way that characters are encoded (by
name, hex or decimal)
While this may do the conversion of numeric entries to named ones,
it is overkill and does not preserve the HTML Markup. What was
requested was a way to scan the HTML for the numeric entries and
make them named (either automatically when you open the file or on
a request basis) without doing any other alteration to the HTML in
the file.
perhaps I misunderstand the problem and apologize if my hint is not
helpful, but on translating from HTML to Text you can *un*check the
"Remove Tags" checkbox in the Translate dialog and your markup will
not be touched. Btw, the opposite funcionalty would be "Remove
Markup" (also under Markup > Utilities) which removes the markup
but leaves encoded entities alone.
Thanks Roland for the tip. I hadn't thought of doing the Translate
backwards and then forwards. Should work fine, as you say. I may be
back to ask how to do that for a fairly large number of files in one
swell foop, but I think I'd better RTFM first -- it's been a while
since I did that. ;-)
Glad I could help. A little hint towards the big file count problem:
Just create a Text Factory. The translate commands are available there
as well.

happy translating,
Roland
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <***@barebones.com>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <bbedit-talk-***@barebones.com>
Loading...