Keyboard apostrophe not recognised in HTML

Joined
May 7, 2010
Messages
981
Reaction score
14
Points
18
Location
UK
Your Mac's Specs
2 iMacsOSX13.6.4;10.13.6;iPhone SE2 17.3.1;SE1 15.8;iPadMini15.8;iPadAir 2 15.8
I'm learning the basics of HTML and am finding that the standard Apple keyboard apostrophe gets converted into something like this @€. I am using TextEdit formatting in plain text. There is a cumbersome way round the problem by inserting the apostrophe from the special character set.

There seems to be a similar problem with { and } for defining fonts but I haven't found a way round that.
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
What language do you have your Mac set to? Does this match the country it was bought in?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I'm learning the basics of HTML and am finding that the standard Apple keyboard apostrophe gets converted into something like this @€.
I'm guessing that this has something to do with your keyboard layout. I say this because it works fine with a U.S. English keyboard layout, a layout I know is different from the U.K. one.

Upon looking, I notice that there are two U.K. English keyboards. Have you tried the one layout that you aren't using (System Preferences > Keyboard > Input Sources)?

I am using TextEdit formatting in plain text.
Oh you brave soul. Look at using an editor designed for coding such as TextMate or Adobe's Edge Code (both free).
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
I'm going to guess you're not using your Apple keyboard or you have US english as the keyboard setting.

On a UK Apple keyboard using British as the keyboard language all those symbols work fine. The apostrophe is on the same key as ". It's next to the \ key next to Enter. Where as @€ are on the number 2 key
 
OP
A
Joined
May 7, 2010
Messages
981
Reaction score
14
Points
18
Location
UK
Your Mac's Specs
2 iMacsOSX13.6.4;10.13.6;iPhone SE2 17.3.1;SE1 15.8;iPadMini15.8;iPadAir 2 15.8
Oh you brave soul. Look at using an editor designed for coding such as TextMate or Adobe's Edge Code (both free).

Not brave, ignorant. I am told that, if I want to design a website myself, I should use Dreamweaver or similar but it looks expensive and it also looks as if it may not yet be compatible with Mavericks.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Dreamweaver is probably overkill, especially if you're just learning. Those code editors I mentioned are decent starts and may end up suiting your needs just fine. That said, there are many many code editors out there that are both free and more than sufficient for coding.
 
OP
A
Joined
May 7, 2010
Messages
981
Reaction score
14
Points
18
Location
UK
Your Mac's Specs
2 iMacsOSX13.6.4;10.13.6;iPhone SE2 17.3.1;SE1 15.8;iPadMini15.8;iPadAir 2 15.8
Dreamweaver is probably overkill, especially if you're just learning. Those code editors I mentioned are decent starts and may end up suiting your needs just fine. That said, there are many many code editors out there that are both free and more than sufficient for coding.

I understand that Snow Leopard had web-creation software called iWeb and that its equivalent is to be found in iCloud.

Is my informant correct? If so where can I find it?
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
It last came as part of iLife 11 and it no longer has a current version, in iCloud or otherwise I'm afraid.

It still works but no saying for how much longer.

Have a look at everweb - there's a free trial
 
Joined
Mar 25, 2015
Messages
7
Reaction score
0
Points
1
Your Mac's Specs
13” MBP i5 2.5 GHz, 4GB RAM, OS 10.10.2. iPad Air WiFi 16GB, iOS 8.2.
Could the character sequence you're seeing be "’"? If so you have a character encoding error. This article, which helped me with a closely related issue, goes into pretty good detail.

https://askleo.com/why_do_i_get_odd_characters_instead_of_quotes_in_my_documents/

[eta] Short version: Try turning off smart quotes when writing code rather than natural-language prose or verse. If you want typographic quotation marks (and use the right single quotation mark as an apostrophe), set your document's character encoding to Unicode for the broadest compatibility and remember not to use curly quotes in HTML code, only in displayable text.

Hope this helps!

[edit] Arrrgh, I didn't notice how old this post was. Guess the problem has been resolved one way or another by now. Sorry to bump such an old thread.
 
Last edited:
Joined
Nov 10, 2006
Messages
324
Reaction score
6
Points
18
Location
Leeds, England
Your Mac's Specs
17" Core Duo Macbook Pro
Are you saying it shows as @€ once you view it in the browser? If so, this is your solution.

I'd guess you're using latin-1/ISO 8859-1. latin-1/ISO 8859-1 only support 256 characters because it's one byte per character ((8 *2) * (8 *2)).

There are two solutions:

1. Instead use the newer UTF-8 character set which can use between 1 and 4 bytes to store a character. UTF-8 can store a whopping 1,111,998 characters. If you set your web page to use a character set like latin-1/ISO 8859-1 when it comes across a character that is represented by more than one byte it mis-renders it into something like @€. To convert to UTF-8 you should be able to set the character encoding in your text editor (set it without BOM as this will only cause you problems) but you also need to set the character set in your web page (instead of what you have there already):

<meta charset="utf-8" />

2. Keep the encoding as is but use HTML entities. For example curly quotes (“”) aren't usually part of a single byte encoding but you can instead express then in HTML as “ and ”

I do not recommend option two. For everything, always, always, always use UTF-8. You will save yourself headaches in the future.

Note UTF-16 and UTF-32 may sound better than UTF-8 but neither can store characters as a single byte so aren't as efficient.

Always, always, always use UTF-8 for your text documents, database connections, etc.

If @€ appears within the text editor changing the character encoding should still solve your problem.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Note that the original post was from November 2013.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top