A Consuming Experience

Thoughts on my experiences as a consumer of products, services, people (well maybe not that last one...), from reviews to raves, rants and random thoughts - concentrating on technology, gadgets, software, product usability, consumer issues, customer service. Including some introductory guides and tips on various subjects (like blogging!) which stumped me until I figured them out. And the occasional ever so slightly naughty observation.

Add this blog to Del.icio.us, Digg or Furl | Create Watchlist for this blog

Add this blog to my Technorati Favorites!

Posting code: the secret

Tuesday, March 08, 2005
Deutsch | Español | Français | Italiano | Português | 日本語 | 한국어 | 汉语

Add this post to Del.icio.us, Digg or Furl | Create Watchlist

OK. I've got it figured out from too much time spent trying to get the code in my last post to display properly. It's not only those blasted "less than" and "greater than" symbols, but also the ampersand.

So, a note while it's fresh - both for me and in case it may help anyone else.

1. Replace all the "&" with "&# 38;" (without the space) (or with "&")
2. Replace all the "<" with "&lt;"
3. Replace all the ">" with "&gt;"

(I'm getting the sequence at the end of no. 1 to display properly by actually typing in this sequence into my post (without the spaces): "& amp; 38;")

The order is important - replace any "&" in the code FIRST (i.e. do step no. 1 first) otherwise you could inadvertently replace the "&" that you need as part of the "<" and ">" replacements.

I do that in Word, with a macro I've now whipped up. Then, just to get rid of any horrid hidden codes or changes introduced by Word (it does terrible things to double quotation marks), I copy/paste the changed code into Notepad. Then I copy/paste from Notepad to my post. (Yes, I know I need to get a proper text editor!).

Conversion tool

[Added 21 May 2005:] Found a site that provides an automatic converter, yay: Centricle.

You just copy/paste your code into the first box and hit "Encode" and it does a search and replace for you automatically of the tricky characters you have to encode in order for code to show up properly. Just copy the code from the box for pasting into your post or webpage. It also converts the other way round - i.e. it decodes as well as encodes.

Now if only I can get long code to wrap in my posts without mucking up its workings... ([added 21 May 2005:] which I now can thanks to redryder52, another yay!)

Technorati Tags: , , , , , , , , ,

Links to this post on:

Create link here by posting on Blogger

3 Comment(s):

What would be great is a form which would auto-replace all of the "<", ">", and "&" characters with the replacement codes you specified here. You'd paste your original text into a textbox, then just one click and bye-bye brackets and ampersands! =)

(By Six, at Friday, May 20, 2005 11:26:00 AM)  Edit Comment

Absolutely, Davetta, and coincidentally I found one and was about to post the link! Which I've now done, see above. :-)

(By Improbulus, at Saturday, May 21, 2005 6:29:00 PM)  Edit Comment

Hey, now that's what I call fast service! Thanks for letting us know about this! =)

(By Six, at Thursday, May 26, 2005 12:11:00 AM)  Edit Comment

Post a Comment | Subscribe to Post Comments [Atom] | Subscribe to all comments on all posts

| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »
| Previous Post »