To Thread - Forum Home

The Mudcat Café TM
https://mudcat.org/thread.cfm?threadid=6390
33 messages

tech: HTML Ampersand Codes

04 Sep 98 - 05:05 AM (#37019)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Joe Offer

Good try on the HTML, John, but no cigar. You started bold correctly with [b] (substitute angle brackets for the square ones I put in the examples), but then you have to end the bold print with [/b] (the slash closes the action). I also added line breaks [br] to make the song a bit more readable. This is one of my favorites, and I'm glad to have the extra verses.
-Joe Offer-

this was John's original post in this thread, before I moved it to a thread that has other "Wild Rover" information.
-Joe Offer-
    Thread #6390   Message #37013
    Posted By: John in Brisbane
    04-Sep-98 - 12:32 AM
    Thread Name: LYR ADD: Wild Rover (No Nay Never)
    Subject: Lyr Add: WILD ROVER (NO NAY NEVER)

    Click for related thread
    A couple of extra verses for this old standard, being the third-last and second-last verses. Goodness knows whether my HTML bold will work.

    This is the way I first learned this song.

    WILD ROVER (NO NAY NEVER)

    I've been a wild rover for many a year
    And I spent all my money on whiskey and beer,
    And now I'm returning with gold in great store
    And I never will play the wild rover no more.

    CHO: And it's no, nay, never,
    No nay never no more,
    Will I play the wild rover
    No never no more.

    I went to an alehouse I used to frequent
    And I told the landlady my money was spent.
    I asked her for credit, she answered me "Nay.
    Such a custom as yours I could have any day."

    CHO:

    I took from my pocket ten sovereigns bright
    And the landlady's eyes opened wide with delight.
    She said, "I have whiskey and wines of the best,
    And the words that I spoke sure were only in jest."

    She reached up behind her to grab a glass from the shelf,
    And I says, "Aha", just laughing to myself.
    She said, "But, dear sir, your whiskey is poured."
    I said, "Keep/Stick your bad whiskey, you bloody old fraud".

    CHO:

    There was Katy and Nancy and Margaret and Sue,
    And three or four more who belonged to our crew.
    We'd stay up 'til midnight and make the place roar.
    I've been a wild boy but I'll be one no more.

    I'll go home to my parents, confess what I've done,
    And I'll ask them to pardon their prodigal son.
    And if they caress (forgive) me as ofttimes before,
    Sure I never will play the wild rover no more.


    TGIF
    John


04 Sep 98 - 07:32 AM (#37031)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: AndreasW

Hi Joe,
I guess you know how to produce the angle brackets (<>),
but as you always write the examples
with [ ] and a long explanation that these [ ] are to be replaced by < >
or with spaces and "orders" to remove the spaces
and for the benefit of all:
to produce angle brackets (<>) in the HTML output use
&lt;
and
&gt;
in your source.
btw, to produce a & in the output, use &amp;
and for a quotation mark (") use " (e.g. for thread names/subjects)

Andreas


04 Sep 98 - 07:34 AM (#37033)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: AndreasW

oooops, the last example (quotation marks) should have been &quot;
Andreas


04 Sep 98 - 02:46 PM (#37084)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Joe Offer

Hi, Andreas -
I've known about those ampersand codes for quite some time. I didn't just fall off the turnip truck, ya know.... ;-)
I used to use the codes you suggest to tell people how to post lyrics with line breaks, but I found that several people posted lyrics with &ltbr &gt at the end of each line.
Mary had a little lamb&ltbr&gt
Whose fleece was white as snow&ltbr&gt
And everywhere that Mary went&ltbr&gt
The lamb went the other way&ltbr&gt
That kept me puzzled for a long, long time. Apparently, there are some browsers that don't interpret those ampersand codes correctly, and then the display tricks don't work. In frustration, I gave up and started using square brackets in my examples, along with the long-winded explanation of enclosing HTML tags in angle brackets. Maybe I'll try the ampersand codes again and see if maybe people have upgraded their browsers. The codes work just fine in the 4.0 editions of both MSIE and Netscape, but I think some people are still on version 1.356. Thanks for trying to help, though.
-Joe Offer-


05 Sep 98 - 11:05 AM (#37155)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Beavis

Well I suppose that the teacher has to tailor the lessons to the slowest in the class....In this case you have those students that are too stupid to download a newer version of netscape.


06 Sep 98 - 04:32 PM (#37241)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Barbara

Uh, sorry guys, but it's my 1997 Netscape Communicator 4.04 that gave Joe and me the opportunity to sort out the ampersand problem. So, I should just give up and sign my life over to Bill Gates right now? :}
Blessings,
Barbara


06 Sep 98 - 06:58 PM (#37246)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Joe Offer

That's another mystery, Barbara. I'm typing this on Netscape 4.0 (instead of my usual MSIE), and the ampersand codes work just fine. As I recall, Baz was the other person who had trouble, and I never could figure out why.
-Joe Offer-

Testing: <br> & " &


06 Sep 98 - 07:19 PM (#37252)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Joe Offer

OK, now I think I got it. To make it work in both MSIE and Netscape, the code for a left angle bracket has to be:

ampersand-lt-semicolon

-or-

&lt;

I thought Andreas was using the semicolon as punctuation, but I guess it's an integral part of the whole shebang.
Does it look right now, Barbara? If I'm correct, the next character you should see is a correct line break symbol:

<br>

-Joe Offer-


07 Sep 98 - 12:57 AM (#37275)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Barbara

YEP, Joe this time -- I believe --- that what you are sending is what I am receiving. That is to say you may have understood what I thought you wrote, but did you really mean ....oh never mind.
Is this what you said?

ampersand-lt-semicolon
-or -

amp;lt;


And the correct symbol is...the envelope, Johnny, please...

<br>


Did I copy your source code right?
Blessings,
Barbara


07 Sep 98 - 01:40 AM (#37276)
Subject: RE: LYR ADD: Wild Rover (No Nay Never)
From: Joe Offer

....almost, Barbara. You have to copy from "view source" in order to get it correct. If I go back to my previous message to correct it and use my "edit" button, all of those codes that I so carefully attempted to display will turn into real line breaks, and they will no longer be visible. Max learned that the hard way on one of those HTML examples that Dan Mulligan posted, so Dan had to do it all over again.
Gee, I guess we just made a quantum leap forward, eh?
Oh, by the way, what does this have to do with the nice thread poor John started on the Wild Rover? We ARE grateful for those two new verses, John. Please send more. When my friend Jim and I feel outnumbered by the women in the song circle, we like to sing manly drinking songs like that one....
-Joe Offer-


09 May 08 - 11:24 AM (#2336564)
Subject: RE: Mudcat FAQ - Newcomer's Guide
From: topical tom

I did learn to do this once but I have now forgotten how.

   How can one insert a symbol into a Mudcat thread?

                                     Thanks!


09 May 08 - 06:44 PM (#2336844)
Subject: RE: tech: HTML Ampersand Codes
From: Joe Offer

Hi, Tom - I moved you over to this thread, since this is where the ansawer is. Remember than an ampersand code begins with an ampersand and ends with a semicolon.
-Joe-


This Google Search (click) will lead you to more information.


23 Nov 17 - 11:10 PM (#3890043)
Subject: RE: tech: HTML Ampersand Codes
From: Joe Offer

Here's a nice selection of ampersand emojis to play with:
    🙈🙉🙊


24 Nov 17 - 03:58 AM (#3890061)
Subject: RE: tech: HTML Ampersand Codes
From: Mr Red

there is always my page on the subject - just a different presentation. pointers to Katakana/Kanji, Arabic, Russian, Greek, Tamil and various emoji sets etc etc

But I thought we were having a problemo with hash codes - only yesterday I tried posting Cyrillic characters and they failed miserably.

let us see what today brings:
Δ   Θ Σ
𢜑 𢜘 𢜷
🤞 🤦 🤤
ฒ ส ฐ
Ģ ĥ Ĺ


Works on this server today!


24 Nov 17 - 10:46 AM (#3890136)
Subject: RE: tech: HTML Ampersand Codes
From: Nigel Parsons

Apart from the third row which just shows three boxes on my browser.

Cheers


24 Nov 17 - 10:54 AM (#3890140)
Subject: RE: tech: HTML Ampersand Codes
From: DaveRo

That's because your computer doesn't have a font that includes that language (I think it's Thai).

On this machine the second row are boxes.


24 Nov 17 - 10:55 AM (#3890141)
Subject: RE: tech: HTML Ampersand Codes
From: DaveRo

Oops. The third row are emoticons. Same answer though - no font.


24 Nov 17 - 01:51 PM (#3890188)
Subject: RE: tech: HTML Ampersand Codes
From: Mr Red

Thai it must be - this is my solution to Thai fonts similarly with Chinese (Cantonese I think) - I did it years ago.

Using my Hash Code page would tell you the limitations on your own browser. FireFox 57 seems to cope well. & has since 34 (I think), I can check. IE gives Boxes for emojis on line 3. I think it renders the original oldie emoticons as text.


24 Nov 17 - 05:34 PM (#3890240)
Subject: RE: tech: HTML Ampersand Codes
From: FreddyHeadey

I don't really know 90%of what you are talking about but fwiw on my android tablet I see
(upper case) delta space theta sigma
    blank line
      blank line
    three (Thai?) symbols
      G h L but with accents below\above
blank line
blank line


25 Nov 17 - 02:48 AM (#3890272)
Subject: RE: tech: HTML Ampersand Codes
From: DaveRo

Which shows that not all Android devices have the same fonts. I can see line 3 (this is like an optician's site test!) which, are uncommon emoticons, on this tablet. I think Android fonts are only updated with each new version of Android.

I can't see line 2 - which seem to be Han characters

It also suggests that if you're going to post emoticons then the simple ones are best ;)

In most cases it's not the browser which determines the fonts, it's the operating system and what fonts are installed in it.


26 Nov 17 - 04:13 AM (#3890453)
Subject: RE: tech: HTML Ampersand Codes
From: GUEST

I stand corrected, the OS is the arbiter, plus any additions that people apply.

like browsers
IE doesn't like the newer emojis and those it does it defaults to B&W simplified versions (eg 3 wise monkeys)
Firefox 34.05 as IE
Chrome 40.0.2214.111 similar - no modern emojis
Chrome 53.0.2785.116 similar - no modern emojis - Joe Offer's monkeys in B&W
Opera 12.16 similar but no 3 wise monkeys
Opera 28.0 as 12.16
Safari - who cares? The only one I can install is so old I would only use it for verifying really tricky JavaScript wot I wrote.

So for the average user, basically, your browser is the key.


26 Nov 17 - 04:59 AM (#3890463)
Subject: RE: tech: HTML Ampersand Codes
From: Will Fly

😈

I like it!


26 Nov 17 - 05:01 AM (#3890464)
Subject: RE: tech: HTML Ampersand Codes
From: DaveRo

OK. I give up. [Hands-in-the-air emoji]
But some if those browsers are truly obsolete! Does the average mudcatter use an obsolete browser? Apart from IE.

And it's complicated. Different browsers may apply a different font to mudcat. Last time I checked mudcat didn't specify a font so the browser will use its default, which you may be able to specify. In Firefox I have mudcat in sans-serif whereas on most others it appears in serif. On Linux I specified Liberation Sans, on Android it will probably use Droid Sans. The default font in different browsers may lack some emoticons - you get a black/white square - sometimes with the unicode number in it - or have different glyphs for the same emoticon. On my Linux box some emoticons are in monochrome - which I prefer - others are in colour - perhaps they don't exist in my default font so the system finds it elsewhere.

And it will vary with the website encoding. Mudcat is using ISO-8859-1 so these emojis will &-encoded. A UTF-n site may get the emoji encoded differently.

So lots of reasons why emoticons are missing or differ.

Wife's iPad can't do line 2 - though it's a few years old.

BTW - if you get a blank square and wonder what the emoticon us, copy it and google it.


26 Nov 17 - 06:38 AM (#3890473)
Subject: RE: tech: HTML Ampersand Codes
From: treewind

'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'

There's your problem right at the top of the source code of every page on Mudcat: it still uses ISO-8859-1 (a.k.a.Latin-1) which is a limited character set. For emojis and all other known characters to work it needs to be UTF-8, which is now default on most web sites, but unfortunately Mudcat has a HUGE backlog of stuff posted using ISO-8859-1 which would break horribly if a simple global change were made.


26 Nov 17 - 08:57 AM (#3890488)
Subject: RE: tech: HTML Ampersand Codes
From: GUEST,Grishka

The "charset" problem is even more complicated. The backlog has been accumulated without any specification of codepage, with the effect that many codepages are used simultaneously, all of which are 8-bit.

Max seems to be experimenting right now, once again. The setting "charset=iso-8859-1" has been added quite recently; he tried UTF-8 about a year ago. Either of these has well-known consequences, some good, some bad. We have discussed "ad nauseam" methods to work up the backlog.

More importantly: Future handling should be such that the result is independent of the posters' codepage settings, and relieve them from the burden of having to replace special characters (such as those prettified apostrophes) by their HTML ampersand codes.

Max has now found a method which may be a good solution of this problem:

<FORM ACTION="ThreadNewMess-Sub.cfm" METHOD="POST" accept-charset="utf-8">

This should ensure that any (Unicode) character ever posted arrives at the server script in UTF-8 format. It is up to that script to transform it to an ampersand code if necessary (- for umlauts, it may choose to transform them to iso-8859-1 to save space.)

For some hours the other day, this actually seemed to work, but only for posts from and to the Preview page, in other words: when clicking "Preview" on the Preview page.

When we pointed out the discrepancy, Max removed the "accept-charset" clause from the Preview page, so that it now works even worse than before, because "charset=iso-8859-1" is still present.

I have the strong feeling that accept-charset="utf-8" is the right thing to have on both pages. Since they call the very same script "ThreadNewMess-Sub.cfm" on the server, things may be getting wrong inside it, and only in some cases. Another possible explanation is that our browsers do it, in some obscure way.

We have offered Max more than once to analyze that script collectively, although real experts seem to be absent. (I myself am not even a semi-expert, alas. "Google is my scholarship.")

Any insider information and progress report will be appreciated.

?


26 Nov 17 - 10:07 AM (#3890506)
Subject: RE: tech: HTML Ampersand Codes
From: DaveRo

Some of what I wrote this morning is wrong. Firefox - since version 50 (about a year ago) - includes an emoji font in some operating systems (Linux, and Windows XP to 7) rather than relying on installed fonts. Hence my colour emoticons. Apologies to Mr Red.


27 Nov 17 - 03:50 AM (#3890632)
Subject: RE: tech: HTML Ampersand Codes
From: treewind

Actually I was wrong (or at least slightly off-topic) about charset and utf-8. Certainly utf-8 is a good way to go, but the thread topic was about &xxxx; sequences in HTML, and they should render correctly regardless of charset declarations, as long as the receiving system has the required character in a font somewhere.


28 Nov 17 - 03:50 AM (#3890835)
Subject: RE: tech: HTML Ampersand Codes
From: Mr Red

The reason I have a plethora of browsers is to check that my (9 ish) websites do not dis-enfranchise people. I even have 24 languages of FAQ pages to make mister.red inclusive and the first website has a default system that did not rely on JavaScript. It seemed like a good idea at the time, while I self-taught the language. There was one, of this parish, who was quite agitated about not using JavaScript.

For Thai and Chinese fonts I used images of hand-written text. Cyrillic font always seemed to work on various browsers. And for Russian speakers - they would not be using browsers if they could not read the text!


27 Jul 19 - 03:16 PM (#4002316)
Subject: RE: tech: HTML Ampersand Codes
From: Stilly River Sage

One I have to dig out occasionally is the "cent symbol." Does anyone else remember when one of the shift keys in the top row of the typewriter was a ¢ symbol?

Named: &cent;

Code: &#162;


27 Jul 19 - 04:43 PM (#4002328)
Subject: RE: tech: HTML Ampersand Codes
From: GUEST,keberoxu

I do, Stilly!

That was when none of the shift keys
carried an exclamation point,
and in order to form an exclamation point,
you had to type a period
and then
backspace
and type an apostrophe in the same space as the period.


27 Jul 19 - 04:49 PM (#4002330)
Subject: RE: tech: HTML Ampersand Codes
From: Stilly River Sage

That's right, I remember that, and maybe the exclamation point is what was moved in when ¢ moved out. Or the caret (^).

The quick reference I use for the ones I can't remember is https://www.ascii.cl/htmlcodes.htm.


28 Jul 19 - 05:14 PM (#4002454)
Subject: RE: tech: HTML Ampersand Codes
From: Bill D

I have a yellow 'sticky note' program at the top, with some of the odd symbols I like always at hand.
ß ° ? ½ ¼ ¿ p Æ I have a copy of the complete list, but seldom need the really arcane ones.


28 Jul 19 - 05:16 PM (#4002455)
Subject: RE: tech: HTML Ampersand Codes
From: Bill D

hmmm... it doesn't want to show the infinity alt236