How to Convert a File to UTF-8

Written by brian valle
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Convert a File to UTF-8
Encoding non-English messages in UTF-8 ensures proper rendering across various platforms. ( Images)

Unicode Transformation Format 8 (UTF-8) is an encoding scheme that allows applications to properly display complex characters such as Japanese kanji or currency symbols. Many people use UTF-8 encoding to send and receive non-English e-mail messages. Because of its flexibility, many developers prefer to use UTF-8 to create cross-platform applications and design commercial websites. If you wish to convert files to UTF-8, use Notepad or any plain text editor that supports Unicode. You may also use Windows PowerShell to rewrite files using UTF-8 encoding.

Skill level:


    Converting a Text File to UTF-8 Using Notepad

  1. 1

    Launch Notepad and open the text file that you wish to convert.

  2. 2

    Open the "File" menu and choose "Save As."

  3. 3

    Enter your preferred file name. Click the drop-down menu beside "Encoding" and then choose "UTF-8." Click the "Save" button.

    Converting Any File to UTF-8 Using Windows PowerShell

  1. 1

    Download and install the latest version of Windows PowerShell.

  2. 2

    Take note of the exact location of the file that you wish to convert. Obtain this easily by holding down "Shift" and right-clicking the file's icon in Windows Explorer. Choose "Copy as path" from the context menu and then paste this information in Notepad.

  3. 3

    Hold down the Windows key and then press "R." Type "powershell" and then press "Enter." This opens Windows PowerShell.

  4. 4

    Type the following code at the prompt. Replace "C:\scripts\yourfile.dat" with the exact location of the file that you wish to convert. Be sure to enclose it in quotation marks. Press "Enter" when you're done.

    $mypath = "C:\scripts\yourfile.dat"

  5. 5

    Type the following code at the next prompt and then press "Enter."

    get-content -path $mypath | out-file $mypath -encoding utf8

Tips and warnings

  • Windows 7 computers already have PowerShell 2.0 installed. To check if you have it on your computer, open the command prompt and then type "powershell."

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.