views:

48

answers:

3

A customer has a designer mockup of a form button that shows a right facing triangle character after the main text, but I can't seem to get this showing. The offending markup is;

<input type="submit" value="Add to basket &#9654;" />

This should look like 'Add to basket ▶' (if it renders in your browser).

Is this possible or am I doing something wrong?

A jquery workaround is acceptable as a hack too. The page is HTML5 compliant, maybe that'll help.

Thanks in advance,

Ryan

Update: The answers below are correct, there was an easier way though, I just copied the triangle out of this question and straight into me HTML editor. No encoding needed.

Thanks all.

+2  A: 

Yes it is possible.

Make sure to use utf-8 meta:

<meta charset=utf-8 />
Sarfraz
Hey, nice arrow!
bzlm
For what it's worth: that doesn't work on WinXP/IE8.
egrunin
+2  A: 

Ya you can use 100%

just ensure

Content-Type: text/html; charset=utf-8

should be present.

The meta tag is ignored by browsers if the HTTP header is present.

Also ensure that your file is actually encoded as UTF-8 before serving it, check/try the following:

Ensure your editor save it as UTF-8.

Ensure your FTP or any file transfer program does not mess with the file.

JapanPro
A: 

See the late Alan Flavell's page FORM submission and i18n about the issue. It's years old but, as far as I know, still relevant.

In short: form submission happens in the same encoding as the html page itself is in. So you have to provide a usable encoding for the html page.

bart