close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

£ symbol display as a square?

Thread began 12/20/2013 5:01 am by Nathon Jones Web Design | Last modified 1/16/2014 12:30 pm by Jason Byrnes | 702 views | 7 replies |

Nathon Jones Web Design

£ symbol display as a square?

When I enter a £ sign into an iRite field, save it and then view that content on a web page, the pound sign displays as a square symbol.
Is that something I'm doing wrong, or is it a bug in the old iRite?
Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

Make sure your pages are set to use the utf-8 character set:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

you may also need to edit the connection to use the utf-8 character set, for example, a connection named localhost will have the following at line 9 of the Connections/localhost.php file:

$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);




change that to:

$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_set_charset('utf8',$localhost);
Sign in to reply to this post

Nathon Jones Web Design

Classic ASP

Oops....me bad. It's me.
Classic ASP.

I tried this...
<script type="text/vbscript">
poundsign="<%=(rsPROPERTY.Fields.Item("SWPCdesc").Value)%>"
document.write(Replace(poundsign,"£","&pound;"))
</script>

But whilst it didn't produce an error, it didn't solve the issue.
Thanks Jason.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

if you look directly in the database, is the pound sign stored correctly?

if it stored in the DB correctly, then the problem is most likely the page's character set:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Sign in to reply to this post

Nathon Jones Web Design

still no joy

I have the character set as you have described:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

...but I'm still seeing squares for pound signs or, even more strangely, black diamonds with a question mark in the middle:
http://www.nathonjones.com/swpc/property-estate-agents-scotland.asp?SWPC=292 (squares)
http://www.nathonjones.com/swpc/property-lets-rented-accommodation.asp?SWPC=467 (diamonds with question mark)

This text is being fed from a field in an MSSQL database table.
Hope someone can spot the glaring error. Thank you.
Regards
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

Look in the database directly, how is it stored in the database? does it look right if you look at in the database?

try encoding the character in the database so that it is stored as:

&#8364;

Sign in to reply to this post

Nathon Jones Web Design

database fine

The pound sign looks fine in the database. To say I'm confused would be an understatement because I've been working with MSSQL and Classic ASP for a long time and have never encountered this.

I'm using the iRite extension to allow the user to input a description, which often includes a pound sign. How do I get iRite to convert the pound sign to the encoded value you've recommended?

I can't use Server.HTMLEncode either because the description includes <p> </p> tags.

I checked the page against W3C validation and, sure enough, there is an error reported related to utf-8:

"Sorry, I am unable to validate this document because on line 302 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

The error was: utf8 "\xA3" does not map to Unicode"

Line 302 is...
<h3><%IF (rsPROPERTY.Fields.Item("SWPCadd").Value) <> "" Then%><%=(rsPROPERTY.Fields.Item("SWPCadd").Value)%>, <%End IF%><%=(rsPROPERTY.Fields.Item("SWPCtown").Value)%>. <%=(rsPROPERTY.Fields.Item("SWPCpostcode").Value)%></h3>

Man I'm confused!

Appreciate the help. Thank you.
Regards
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...