NBSP being stripped - appears in email as Â

ElJefe

Member
Hi,
Is there any way to preserve HTML entities? I have   used in table cells, and when I test my email in Litmus, what should be a space is being displayed as Â. This is the first time I have seen this problem.
 
This sounds more like an encoding issue, is your template utf8 encoded and using utf8 as the charset in the meta tags ?
 
Hmm... no. Is there a setting to do that in MailWizz? I did some Googling to see how to do it in my code, but it looks like email clients ignore the meta tags and use whatever is in the email header. Additionally, their suggestion was to avoid encoding problems altogether by using HTML entities, which is what I'm doing in my case. Here's a link to the article from Email On Acid.
 
Might it be because I was using the "Test Template" button to send to Litmus, instead of fully sending the campaign?
 
Hmm... no. Is there a setting to do that in MailWizz? I did some Googling to see how to do it in my code, but it looks like email clients ignore the meta tags and use whatever is in the email header. Additionally, their suggestion was to avoid encoding problems altogether by using HTML entities, which is what I'm doing in my case. Here's a link to the article from Email On Acid.
There should be no problem using entities, in your case that's not the problem. Usually when you view signs like  it means the issue is related to encoding. Add "<meta charset="utf-8">" in your email template <head> section. Email clients will follow this encoding afaik.

Might it be because I was using the "Test Template" button to send to Litmus, instead of fully sending the campaign?
i don't think so, but you can try a campaign as well.
 
I think that did the trick. Funny that the article says the meta tag would be ignored, though. o_O

Thanks for the help! Now, if I can just keep table widths in Outlook under control . . . :confused:
 
@Taurian - You just have to make sure your content is utf-8, there's no way around it.
The problem appears when you copy characters from another charset and you paste them in and the current charset cannot interpret them.
no magic way to avoid this.
 
I was able to use some javascript to embed the meta tag:
Code:
        <script>
        $( document ).ready(function() {
            $( ".btn-go-next" ).click(function(event) {       
                var $iframe = $('.cke_wysiwyg_frame');
                $iframe.ready(function() {
                    var strHTML = $iframe.contents().find("html").html();
                    var count = (strHTML.match(/YOURMETANAME/g) || []).length;
                    console.log(count);
                  
                    if(count == 0)
                    {
                        $iframe.contents().find("head").append('<meta name="YOURMETANAME" charset="utf-8">');
                    }                 
                });             
            });
        });         
        </script>

Maybe this can be a temporary solution. Let me know your thoughts.
 
That's not a solution, if you have a look, we already add the utf-8 content meta tag.
The solution, as i said, try to avoid copy/paste.
 
Of course that's a solution.
It isn't. If you want to use it for your use case, no problem at all, if it works for you is fine ;)

We need a "real" solution
The real solution is to stop copying text from a charset encoding and paste it in another charset encoding which can't handle some characters. There's nothing magic to it, it's just common sense, there's no automated way to convert all the bad bad characters in something meaningful from one charset to another.
 
Back
Top