Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ellipsis unviewable in HTML

When pulling data from a MySQL database onto a web page, all ellipses (...) in the data are displayed with a � in Firefox or a square box in IE7.

Has anyone ever encountered this problem before?

Thanks.

update 1: I just changed the original ellipsis '…' with '...' (three dots) and now it works? Any idea what this could be?

like image 367
Ben McRae Avatar asked Mar 01 '23 20:03

Ben McRae


2 Answers

You are probably pulling UTF-8 data from your database to a website with ISO (or other) encoding.

What is the encoding in your database and what is the header encoding for your html?

like image 68
Ólafur Waage Avatar answered Mar 05 '23 18:03

Ólafur Waage


This is really an encoding issue but instead of trying to get around that, I suggest you use the more correct approach of encoding ellipses as `…' HTML entity.

Alternately, you could test it by choosing View > Character Encoding > in Firefox or similar in IE. Most likely you'll end up having to add:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 

or

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> 
like image 28
aleemb Avatar answered Mar 05 '23 19:03

aleemb