Is the method of encoding emails with particular characters and symbols supplying you with a battle?
It’s an issue many electronic mail builders take care of, particularly if some textual content for the physique of the e-mail will get pasted in from a phrase processor. Symbols and characters can also trigger show points in emails should you’re coding emails for various languages.
Setting the content-type is an important issue linked to how electronic mail purchasers show textual content that features particular characters, together with non-Latin-based languages comparable to these spoken in Asia in addition to Hebrew, Arabic, and Greek. However electronic mail builders can even take issues into their very own palms when it is sensible.
For those who’re seeing purple X’s, query marks in containers, or random funky characters that shouldn’t be in your emails, we’re going to take a better have a look at what’s taking place and methods to repair it. Let’s begin by answering some key questions.
What’s character encoding?
Character encoding is the method of writing or coding particular symbols in HTML so they seem as supposed whatever the machine, internet browser, or electronic mail consumer. That is completed by assigning a quantity or code to If you don’t have correct electronic mail encoding, that’s once you see surprising symbols and empty containers.
A particular group of characters is contained in a personality set (charset=” “ in HTML code). Every of these characters is represented by a bit of code that’s used as a key to breed the character on a display.
The Unicode encoding referred to as UTF-8 is the most well-liked and dependable method to outline particular characters and symbols on the net and in emails in addition to different types of digital communication. You may set your total electronic mail to make use of UTF-8 character encoding, which we’ll have a look at later.
However first, we must always point out there’s a method to ensure all particular characters and symbols in your emails show as supposed.
Bulletproof HTML electronic mail encoding
If you wish to be 100% sure that each one textual content renders appropriately within the topic line and physique of your emails, the most secure resolution is to transform particular characters and symbols to their HTML entities.
As you seemingly already know, almost each image and particular character has its personal entity title and quantity. When positioned within the code, the entity produces the image or character.
These entities at all times start with an ampersand and finish with a semicolon. For instance, the HTML entity is used for non-breaking areas. Utilizing HTML entities for larger and fewer than symbols (< and >) could be useful as a result of they could possibly be confused with tags within the code.
Listed here are some frequent particular characters and their HTML entities:
Character | Entity title | Entity quantity |
& ampersand | & | & |
® registered trademark | ® | ® |
£ British pound | £ | £ |
¡ inverted exclamation mark | ¡ | ¡ |
There are additionally HTML entities for electronic mail encoding that entail symbols from non-Latin languages comparable to Chinese language or Greek. Characters from these languages can be represented by Unicode. Listed here are just a few examples:
Character | Entity quantity | Unicode |
光 Chinese language image for gentle | 光 | U+5149 |
א Hebrew letter aleph | א | U+05D0 |
Δ Greek letter delta | Δ | U+0394 |
ॐ Sanskrit image for Om | ॐ | U+0950 |
Even should you don’t have a world electronic mail advertising and marketing technique, you by no means know when you might want to incorporate an emblem via electronic mail encoding of particular characters.
In fact, should you plan to transform particular characters in an HTML electronic mail manually you’ll want to determine the HTML entity. Fortunately, we’ve obtained a free instrument for that!
Electronic mail on Acid by Sinch constructed an HTML character converter to make your job a little bit simpler. Simply paste in your particular characters and symbols, hit a button, and get the HTML entities it’s good to convert them within the electronic mail physique.
Attempt the Character Converter
What’s content-type?
When taking up the duty of electronic mail encoding, you can too inform browsers and electronic mail purchasers the way you anticipate them to interpret various kinds of characters by setting the content-type. Even in case you are changing particular person particular characters to HTML entities, it’s nonetheless sensible to outline the content-type of your electronic mail.
You set the content-type by selecting the suitable character set. The 2 most typical character units are UTF-8 and ISO-8859-1. Nevertheless, in nearly all circumstances, you ought to be utilizing UTF-8 as an electronic mail’s content-type.
Why is UTF-8 greatest for character encoding in electronic mail?
Whereas there are various methods to encode characters, UTF-8 has develop into a global customary due to how complete it’s. UTF-8 is able to encoding greater than 1,112,000 totally different characters. That features each written language, math symbols, musical notations, and even the emojis utilized in electronic mail advertising and marketing.
The issue with utilizing the ISO-8859-1 character set is that it solely accounts for Latin characters and symbols, which excludes many Japanese symbols and glyphs. The picture under exhibits how such characters fail to show appropriately utilizing ISO-8859-1 in comparison with UTF-8
The consequence on the correct features a bunch of jumbled textual content, which is the ISO-8859-1 interpretation of the symbols. Discover, nevertheless, when the HTML entity is used, particular characters show appropriately for each UTF-8 and ISO-8859-1. That’s what makes that technique foolproof.
The place to designate content-type in emails
For those who’re creating a web site, you’ll be able to designate content-type or specify the character set in a meta tag utilizing code like this:
<meta http-equiv="Content material-Kind" content material="textual content/html charset=UTF-8" />
However as you might remember, there are some main variations between internet and electronic mail improvement. And that is yet one more one. Electronic mail purchasers will ignore the content-type within the meta-tag. As a substitute, electronic mail purchasers at all times seek advice from what content-type is ready within the electronic mail header.
The e-mail header offers a bunch of technical details about the message, together with the date, sender title (from:) and recipient (to:) in addition to issues like electronic mail authentication particulars. When an electronic mail consumer sees the character set UTF-8 outlined within the head, it is aware of methods to interpret characters all through the message.
set content-type in electronic mail headers
Under you’ll see a code snippet of a specific electronic mail header that features the content-type set to UTF-8 on the backside:
Date: Wed, 15 Dec 2021 12:45:55 -0700 To: check@check.com From: testfrom@check.com Topic: UTF-8 Message-ID: <e06deabc923f3378e4b237a20be324cc@www.check.com> X-Precedence: 3 X-Mailer: EOAMailer 5.0.0 MIME-Model: 1.0 Content material-Switch-Encoding: 8bit Content material-Kind: textual content/html; charset="UTF-8"
Setting content-type and defining a personality set is vital for the readability and accessibility of your emails. It ensures nothing breaks the studying sample for a subscriber, whether or not the subscriber is studying the e-mail herself or utilizing a display reader with emails.
That’s why Electronic mail on Acid by Sinch consists of the flexibility to set or change the content-type within the accessibility settings of the Marketing campaign Precheck automated workflow. With the press of a button, the platform makes certain the correct code is added to the e-mail header.
As a result of electronic mail service suppliers (ESPs) set content-type within the header, now we have one other layer of complexity added to our electronic mail improvement. If essential, contact your ESP and ask them what content-type they set within the header when sending the emails. As soon as you understand the content-type, use that worth in your HTML meta tag when designing the e-mail.
In any other case, you’ll be able to at all times depend on the bulletproof technique of changing particular characters and symbols to their corresponding HTML entity.
Electronic mail consumer help for content-type
Another excuse to solely use UTF-8 for electronic mail encoding is that it’s broadly supported by main electronic mail purchasers. Practically each web page on the web makes use of UTF-8 for encoding as do electronic mail purchasers.
We ran exams to see what purchasers did when the content-type was specified within the header and located that Gmail was the one outlier. It doesn’t matter what was designated within the electronic mail header, Gmail is the one consumer that robotically converts your textual content to UTF-8. That features in iOS when individuals use Gmail on iPhones or iPads.
One attention-grabbing motion we observed: The online-based purchasers convert your textual content to the content-type character set earlier than displaying it in an internet browser. We had been in a position to verify this by viewing what content-type they had been setting of their meta tags. Because it seems, most of them are utilizing UTF-8.
Is your electronic mail encoding working?
In case your electronic mail advertising and marketing campaigns have a tendency to incorporate textual content for quite a lot of languages, particular characters, or symbols, how are you going to be assured they’re displaying appropriately.
The reply? You’ve obtained to run exams and take a look at electronic mail previews to know for certain.
Whilst you may ship handbook exams to various kinds of inboxes, gadgets, and browsers, Electronic mail on Acid offers a streamlined method to check your electronic mail encoding and all kinds of different elements. That features deliverability, inbox show, Outlook rendering points, darkish mode emails, and extra.
Electronic mail on Acid’s mission is to simplify the complexities of electronic mail advertising and marketing. That’s why we create instruments just like the useful HTML character converter. And, it’s why we’re trusted by electronic mail geeks world wide.
Attempt the Character Converter
This publish was up to date in February 2022. It was additionally up to date in January 2019 and February 2017 and first printed in 2011.
Writer: The Electronic mail on Acid Crew
The Electronic mail on Acid content material crew is made up of digital entrepreneurs, content material creators, and straight-up electronic mail geeks.
Join with us on LinkedIn, comply with us on Fb, and tweet at @EmailonAcid on Twitter for extra candy stuff and nice convos on electronic mail advertising and marketing.
Writer: The Electronic mail on Acid Crew
The Electronic mail on Acid content material crew is made up of digital entrepreneurs, content material creators, and straight-up electronic mail geeks.
Join with us on LinkedIn, comply with us on Fb, and tweet at @EmailonAcid on Twitter for extra candy stuff and nice convos on electronic mail advertising and marketing.