Identify the kind of broken text

Character encoding tells software how to turn file bytes into characters. If a file is read using a different encoding from the one used to save it, Korean text can turn into unrelated characters.

Make a copy, then open the original in a browser and in the application that created it. Finding a program that still displays the correct text helps establish whether the source characters are intact.

SymptomFirst check
Unrelated characters replace Korean syllablesWhether the file encoding matches its charset
Square boxes appear instead of lettersWhether the selected font supports Korean
The saved source already contains � or question marksWhether an earlier, intact copy is available
Only the filename is garbledWhether renaming the file resolves that separate issue

Read the original correctly before saving as UTF-8

Start in the original application or a code editor that can reopen a file using a chosen encoding. Get the Korean text to display correctly before saving a new UTF-8 copy.

Saving an already garbled display as UTF-8 can preserve the wrong characters in the new file. For an EUC-KR source, first decode it as EUC-KR, verify the text, then convert it to UTF-8. Do not overwrite your only original while trying different encodings.

  1. Duplicate the original file and work on the copy.
  2. In that separate code editor, use its encoding or reopen-with-encoding command to find the correct display.
  3. Save the correctly displayed text as a new UTF-8 .html file.
  4. Reopen the new file in the browser and in the HTML editor to compare the text.

Match the charset declaration to the saved file

For an HTML file saved as UTF-8, put meta charset="utf-8" near the start of head, within the first 1,024 bytes. Place it before a long block of styles.

Changing the declaration does not convert the file’s bytes. An EUC-KR file still needs to be read correctly and saved as UTF-8. If an older Content-Type meta declaration is also present, make sure it does not name a conflicting encoding.

Beginning of an HTML file saved as UTF-8
<!doctype html>
<html lang="ko">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>한글 보고서</title>
</head>
<body>
  <h1>한글이 올바르게 보이는지 확인하세요</h1>
</body>
</html>

Import again and inspect the downloaded HTML

This editor reads UTF-8 by default and can read EUC-KR when a matching encoding declaration appears near the start of the file. UTF-16 is recognized through its byte order mark. It does not guess every undeclared legacy encoding; if reading fails, save a UTF-8 copy from the source application and upload it again.

After a successful import, HTML downloads use UTF-8 with a matching declaration. Choose 내보내기 (Export), HTML, then HTML 다운로드 (Download HTML). Reopen the downloaded file and check Korean text in both the heading and body.

This preserves correctly decoded characters. It cannot reconstruct original letters that have already been overwritten by question marks or replacement characters.

Check fonts if the source text is correct

If Korean text is correct in the code but appears as boxes in the preview or PDF, check the font. The selected font may lack Korean glyphs, or an external web font may not be available.

Mac and Windows can have different installed fonts. Supply Korean-capable fallback fonts and end the list with a generic family. A server-generated PDF can also use different fonts from your computer, so open the final PDF to review it.

Example with operating-system font fallbacks
body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

Frequently asked questions

Will changing meta charset to UTF-8 fix the file?

Only if the file is actually saved as UTF-8. Read the original with the correct encoding first, save a UTF-8 copy, then match its declaration.

Can I upload an EUC-KR HTML file?

Yes, when its early encoding declaration correctly identifies EUC-KR. Missing or incorrect declarations can prevent correct reading. A UTF-8 copy is a useful alternative, and edited HTML downloads use UTF-8.

Why does Korean text become boxes only in the PDF?

If the source preview has the correct letters, first check font availability in the PDF rendering environment. Add Korean-capable fallbacks instead of relying only on an external web font, then review a new export.

References

Edit HTMLOpen tool