Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The use of character entities in HTML #61

Closed
diagramatics opened this issue Mar 12, 2014 · 2 comments
Closed

The use of character entities in HTML #61

diagramatics opened this issue Mar 12, 2014 · 2 comments

Comments

@diagramatics
Copy link
Contributor

Occured to me when inspecting @KuraFire's PR (#57) for translation. Should we use character entities to replace special characters (apart from < and >) or because of the <meta charset="UTF-8"> we can just paste it in place instead to save character bytes?

@KuraFire
Copy link
Contributor

Saving character bytes on entities is generally a waste of time/energy. However, I'm personally* generally in favor of using actual UTF-8 characters over entities, because that's kind of the point of using UTF-8 in the first place.

* Not particularly backed up by research into what would be a best practice here. 

Faruk Ateş, co-founder
https://presentate.com/

Sent quickly with thumbs.

On Tue, Mar 11, 2014 at 9:44 PM, Steven Sinatra notifications@github.com
wrote:

Occured to me when inspecting @KuraFire's PR (#57) for translation. Should we use character entities to replace special characters (apart from < and >) or because of the <meta charset="UTF-8"> we can just paste it in place instead to save character bytes?

Reply to this email directly or view it on GitHub:
#61

@scheinercc
Copy link

@diagramatics - There are the rules from the Google HTML/CSS Style Guide which I personally consider as quite general:

There is no need to use entity references like —, ”, or ☺, assuming the same encoding (UTF-8) is used for files and editors as well as among teams.

The only exceptions apply to characters with special meaning in HTML (like < and &) as well as control or “invisible” characters (like no-break spaces).

Source: http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml#Entity_References

🐢

@mdo mdo closed this as completed in 5a858b6 Mar 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants