e-mail 한글 깨짐 현상

2016. 12. 2. 16:41Front/Html

반응형


Problem : e-mail 한글 깨짐 현상

 - setting my html encoding
    : meta http-equiv="Content-Type" content="text/html; charset=utf-8"

현재 이메일을 전송시에 클라이언트에서 한글이 깨져보이거나 정상적으로 보이거나 하는 현상이 있다.

 What is Content-Type?

A Content-Type tells the web browser or email application how to interpret the text characters in your HTML or the body of the email. The most popular character sets are UTF-8 and ISO-8859-1.


 Where does this all fit into HTML emails?

In website development, we can tell the web browser what character set to use in a meta tag like this:

<meta http-equiv="Content-Type"  content="text/html charset=UTF-8" />

Emails are displayed in clients using the same premise. It will display the email based on what Content-Type has been set. However, email clients read the Content-Type value that is set in the email header and they completely ignore the META tag that is within the HTML.


현재 HTML안에 meta tag로 설정을 해놓았는데 무시 된다는 것! 그래서 header에 넣으라는것 같은데...

현재는 아래처럼 <head> tag 안에 meta로 설정을 해놓았다.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>



참고 사이트 :

HTML Character Entities :  http://www.intuitive.com/coolweb/entities.html

HTML Character Converter : https://www.emailonacid.com/character-converter


우선 짜놓은 소스를 살펴보니 이메일 관련 라이브러리를 제공받아서 사용하는데 거기에서 다시 header와 body를 구성하는데 header에 다시 Content-Type와 charset을 구성. 

결국 body는 html meta tag에 설정을 해놨기 때문에 현재의 header에 있는것과 중복이 되는것 처럼 보였다.

나중에 추적하기 위해 로깅을 남기는 작업 수행 및 body에 들어가는 html meta tag들을 삭제 후 테스트.

문제가 되어지는 이메일을 사용하여 재현할 수가 없으니..로깅을 남겨 지켜보도록 함.


끝~





반응형

'Front > Html' 카테고리의 다른 글

image map 편하게 사용하기  (0) 2018.07.17
about HTML 텍스트 레벨 요소  (0) 2018.07.10
about html 요소  (0) 2018.07.10