AntipixelNo one knows je ne sais quoi like us

Edit This Page < Home > Without Christo


Character to Entity Encoder Bookmarklet

Comments: 5


Steve Minutillo posted a character to entity encoder bookmarklet which instantly converts any character above 127 appearing in any input type=text and textarea on the page. I can now go to a café and not a caf&#233;. This means a lot less running off to BBEdit’s entities palette to find the codes for things I’ve forgotten. Neat little handy things like this make me feel good (if envious).

It’s a handy method, by the way, to make post-worthy quoted text that contains typographer’s quotes, proper apostrophes, &c.

•••
Posted to The Good 2003.05.20 (Tue) • 00:42

Comments

Posted by steve   2003.05.20, 01:31

不客氣!

Or I guess for your site that would be どういたしまして。

Posted by Rudolf Ammann   2003.05.21, 18:25

Neat.

However. This site has UTF-8 for a charset, so you wouldn’t need any html entities because UTF-8 handles all the special characters, which means you’re using the html entities for backward compatibility with browsers that don’t support UTF-8 yet. But then again, this site also uses a CSS layout which requires a browser to support the DOM.

Are there any browsers out there that support the DOM but do not support UTF-8? If no, are you using the html entities for the benefit of those readers who read this site without the layout?

Just thinking out loud (and there must be a fault in my reasoning since Dean Allen uses UTF-8 plus entities, and when was the last time he went wrong?).

Posted by steve   2003.05.22, 00:27

I encode to entities to get around weaknesses in server side software, not client side. There are some sites (mine included) that may munge and ruin non-ASCII (especially multi-byte) characters in the scripts that process input, in the database or database handling code, or in the scripts that handle output. Encoding to entities sidesteps all these problems.

Posted by Rudolf Ammann   2003.05.22, 07:34

Fair enough. Thanks.

Posted by Pablo Perez Benitez   2005.02.04, 11:38

Good, but I need a simpler bookmarklet to turn “<” and “>” into entities, so I can easily post code snippets.

Post a comment:

*

* (not displayed)


Remember personal info?
(optional)


* Required
You can use basic HTML below, but URLs don't link automatically.



Make HTML-safe: convert

To help reduce comment spam, you must preview your comment before posting. Sorry about this, but I'm borderline homicidal with the spam crap.

Send This Story to an Enemy









• • •

Search Options

Possibly Related Entries

Complete Archives


Valid XHTML


Antipixel

Antipixel.com
© 2005 Jeremy Hedley
All rights reserved and so forth.
Rights & Administrivia
Privacy info