Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chillies

macrumors newbie
Original poster
Aug 30, 2013
6
0
I made a website for a holiday rental property a few years ago using dreamweaver uploaded using fetch. All good displayed fine. A few months ago when viewing the site I noticed strange symbols appearing on each page specific to text -eg. triangles with question marks inside and other symbols I cant really describe. Ive checked the code in dreamweaver which hasnt changed . Found a previous post that mentioned to check unicode- which is set to 5.0 -UTF-8. Not sure if its an issue with fetch and what settings I should examine- but it is very frustrating and really dumbs down the site. If anyone has some advice on how I can return the website to its original form without these annoying symbols id be very grateful
thanks
 

costabunny

macrumors 68020
May 15, 2008
2,466
71
Weymouth, UK
You could check the code and where characters that may be non-existant in certain fonts (the @ and $ and £ symbols as examples) are used, see if they are encoded.

for example when I code I always use & when I want the page to display a @ symbol and £ for the £.

That way all browsers know exactly what the text should render as, in any language etc.
 

chillies

macrumors newbie
Original poster
Aug 30, 2013
6
0
Symbols appearing on website

thanks for the replies

Brian- yes its consistent in appearing on any computer so I dont think its a browser issue
Costa - code looks fine - im not wanting to code any symbols -its just plain text

the symbols are appearing between the text and even at the beginning of some images -
 

chillies

macrumors newbie
Original poster
Aug 30, 2013
6
0
Symbols appearing on website

Thanks costa

here is an example - text on an accommodation page

<tr>
<td height="74" colspan="5"><p class="justify"><span class="justify">Elephants at Sunset accomodates from 2 - 6 persons plus two elephants, one bull, two giraffes</span><span class="justify">, three penguins and several monkeys.**The ground floor* consists*of a*double bedroom, lounge, dining, kitchen, reading room and bathroom. Upstairs comprises a master bedroom, twin bedroom</span><span class="justify">, toilet and large open lounge and bar. The home includes an outdoor entertaining *area with*large barbeque, generous backyard and childrens playground. The front garden is*spacious and fully*fenced to ensure pets remain withing the confines of the home. This mud brick, chalet style home provides an eclectic*and unique*getaway *haven* <span class="yellow">Click on images to enlarge</span></span><span class="yellow"></span></p></td>

ok a little messy I admit - but symbols appearing after Sunset on first line -then between plus and two - well check it out

http://www.elephantsatsunset.com/html/accomodation.html

thanks
 

costabunny

macrumors 68020
May 15, 2008
2,466
71
Weymouth, UK
Looking at the source on the page the characters are in the text. I would suggest the server is configured incorrectly perhaps?

Can you attach the original html file and I'll put it on apache and see how that renders the file?

someone might jump in here...
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
I suspect the original data has somehow been corrupted.

I used this command-line in Terminal:
Code:
curl http://www.elephantsatsunset.com/html/accomodation.html | hexdump -C >~/Desktop/accom.txt
You can copy and paste it into a Terminal window.

Here's part of the output file ("accom.txt" on the Desktop):
Code:
000018e0  74 69 66 79 22 3e 45 6c  65 70 68 61 6e 74 73 20  |tify">Elephants |
000018f0  61 74 20 53 75 6e 73 65  74 20 20 ac dd 61 63 63  |at Sunset  ..acc|
00001900  6f 6d 6f 64 61 74 65 73  20 66 72 6f 6d 20 32 20  |omodates from 2 |
00001910  2d 20 36 20 70 65 72 73  6f 6e 73 20 70 6c 75 73  |- 6 persons plus|
00001920  ac dd ac dd 74 77 6f 20  65 6c 65 70 68 61 6e 74  |....two elephant|
Every place where a "funny symbol" appears in the browser or a text editor, there are at least 2 bytes that are invalid in UTF-8. Note the 'ac dd' before the "acc" text on line 18f0. Also note two adjacent 'ac dd' instances at start of line 1920.

If I had to guess, it would be that something did an incorrect conversion between charsets, or something interpreted the data using the wrong charset.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
Try changing in head charset:

<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1" />

Or, keep UTF-8 but dynamically filter out invalid UTF-8 encoded characters (which I am guessing that content was imported from third party source) through a filter, like this in PHP:

Code:
$text = mb_convert_encoding($text, 'UTF-8', 'UTF-8');

Otherwise, an old trick is to copy/paste into a normal ASCII text editor (not RTF) like Notepad on Windows or TextEdit set as "plain text" in settings on Mac and re-paste back (not special paste or match style) into DreamWeaver, which also strips invalid codes.
 

ezekielrage_99

macrumors 68040
Oct 12, 2005
3,336
19
You could check the code and where characters that may be non-existant in certain fonts (the @ and $ and £ symbols as examples) are used, see if they are encoded.

for example when I code I always use & when I want the page to display a @ symbol and £ for the £.

That way all browsers know exactly what the text should render as, in any language etc.

That would have been my expectation as well. Otherwise I would have suggested they're using either non-standard fonts, not using valid code or haven't closed off the tags properly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.