Jump to content


Photo

Character Display


  • Please log in to reply
4 replies to this topic

#1 nfr

nfr
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 14 May 2006 - 12:31 PM


Hello -

I am having an issue with the display of certain characters in different output formats. For example, a single-quote character displays OK when the page is displayed through a normal (IE) browser. When, however, the same character is displayed in Outlook or even through the Yahoo! Mail client, the character appears incorrect, i.e. as a sequence of differnet characters. Is there anyhing that can be done to standardise the output of special/foreign characters (other than have to replace every character with the HTML entity by hand)? I have had a play with htmlentities and htmlspecialchars but this does not really resolve the problem. Is it possible to force the browser to use a specific character set? iso or something?

Regards,

Neil.

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 14 May 2006 - 12:44 PM

You might want to follow reading this topic:

[a href=\"http://www.phpfreaks.com/forums/index.php?s=&showtopic=93331&view=findpost&p=373499\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...ndpost&p=373499[/a]

I thought to pass on what some are doing using Flash and JavaScript to display headings and text in any font desired.

I don't know if you can make things work on all third party applications (such as email clients), but the other option that's getting popularity is to use sIFR.

"...a method to insert rich typography into web pages without sacrificing accessibility, search engine friendliness, or markup semantics."

"sIFR is meant to replace short passages of plain browser text with text rendered in your typeface of choice, regardless of whether or not your users have that font installed on their systems. It accomplishes this by using a combination of javascript, CSS, and Flash."

[a href=\"http://www.mikeindustries.com/sifr/\" target=\"_blank\"]http://www.mikeindustries.com/sifr/[/a]
[a href=\"http://www.mikeindustries.com/blog/\" target=\"_blank\"]http://www.mikeindustries.com/blog/[/a]


sIFR resources:

[a href=\"http://www.adobe.com/devnet/dreamweaver/articles/sifr_demo.html\" target=\"_blank\"]http://www.adobe.com/devnet/dreamweaver/ar.../sifr_demo.html[/a]

[a href=\"http://usabletype.com/articles/2004/how-and-when-to-use-sifr/\" target=\"_blank\"]http://usabletype.com/articles/2004/how-an...en-to-use-sifr/[/a]

[a href=\"http://www.maratz.com/blog/archives/2005/03/11/two-color-sifr/\" target=\"_blank\"]http://www.maratz.com/blog/archives/2005/0...two-color-sifr/[/a]
[a href=\"http://www.maratz.com/blog/archives/2005/03/16/two-color-sifr-take-two/\" target=\"_blank\"]http://www.maratz.com/blog/archives/2005/0...-sifr-take-two/[/a]

[a href=\"http://www.communitymx.com/content/article.cfm?cid=243EE\" target=\"_blank\"]http://www.communitymx.com/content/article.cfm?cid=243EE[/a]


Here are some sites that are using sIFR:

[a href=\"http://www.xerto.com\" target=\"_blank\"]http://www.xerto.com[/a]

[a href=\"http://www.cactuslab.com\" target=\"_blank\"]http://www.cactuslab.com[/a]

[a href=\"http://filecloud.com\" target=\"_blank\"]http://filecloud.com[/a]

[a href=\"http://www.exentricthinking.com\" target=\"_blank\"]http://www.exentricthinking.com[/a]

[a href=\"http://www.erequester.com\" target=\"_blank\"]http://www.erequester.com[/a]

[a href=\"http://abcnews.go.com\" target=\"_blank\"]http://abcnews.go.com[/a]

[a href=\"http://www.astonmartin.com\" target=\"_blank\"]http://www.astonmartin.com[/a]

[a href=\"http://www.bryght.com\" target=\"_blank\"]http://www.bryght.com[/a]

[a href=\"http://www.bankofamericacolonial.com/wall.asp\" target=\"_blank\"]http://www.bankofamericacolonial.com/wall.asp[/a]





#3 nfr

nfr
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 14 May 2006 - 01:31 PM

Genius!

#4 nfr

nfr
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 14 May 2006 - 04:30 PM


I thought that it was completely resolved but now I've hit another problem.

I have the XML below. The problem is that it stumbles on the character entities (’ and ‘). How can I map these two to the correct entities?

Regards,

Neil.

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<rss version="2.0">
<channel>
<title>The Costa Blanca and Costa Calida Leader Newspaper | Local News for the Spanish Coastal Regions</title>
<link>http://news.costabla...der.com/</link>
<description>Local News for the Costa Blanca and Costa Calida from The Leader Newspaper</description>
<language>en-uk</language>
<copyright>Copywrite © 2004-2005 The Leader Media Group, S.L.</copyright>
<webMaster>webmaster@theleader.info</webMaster>
<pubDate></pubDate>
<lastBuildDate></lastBuildDate>
<ttl>60</ttl>
<image>
<title>The Costa Blanca and Costa Calida Leader Newspaper | Local News for the Spanish Coastal Regions</title>
<width>124</width>
<height>18</height>
<link>http://news.costalan...der.com/</link>
<url>http://www.costablan...r_rss.gif</url>
</image>

<item>
<title>Tinnitus</title>
<link>http://www.costablan...ion_id=1</link> <guid isPermaLink="true">http://www.costablan...ion_id=1</guid>
<pubDate>08/05/2006</pubDate>
<description>Tinnitus is one of the most common of the ear conditions and is commonly known as &lsquo;ringing in the ears.&rsquo; It has been estimated that one in ten adults (in the UK) suffer from this condition in varying degrees. It is more common in people over 40 and in those who suffer from loss of hearing. Tinnitus originates from the Latin word &lsquo;Tinnere&rsquo; meaning &lsquo;to ring.&rsquo; Tinnitus has two major categories &ndash; objective and subjective. Subjective is more common. </description>
</item>
</channel>
</rss>

#5 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 14 May 2006 - 05:41 PM

There are five built-in internal general entities: &amp;, &lt, &gt;, &quot;, &apost;

All other entities must be declared in the DTD/schema before being used.

DTD example:

<!ENTITY lsquo "‘">

Other option is to use <![CDATA[ ... ]]

hth.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users