Skip to content

Fix garbled characters

Power Automate can automate both web services and on-premises software, but when you handle external data, you also need to pay attention to character encoding.

This article explains what to do when an output file has garbled characters.

Actions that output the data they handle to an external file, such as the “Write XML to file” action, have a parameter called “Encoding”.

If data you output with one of these actions has garbled characters, changing this “Encoding” parameter may fix the problem.

On Japanese-language Windows, Shift_JIS is used as the system’s default character encoding (the ANSI code page).

Older versions of Windows Notepad often worked on the assumption of this default encoding, so files output in UTF-8 or another encoding could show garbled characters when opened. Starting with the Windows 10 May 2019 Update (version 1903), Notepad handles UTF-8 better: it can save as UTF-8 without a BOM, and UTF-8 is the default encoding for new files.

If text is garbled when you open the file in software that assumes Shift_JIS, such as an older version of Notepad, setting “Encoding” to “System default” fixes it. Depending on the action, this option may be labeled “ANSI” or “Default” instead.

When you output data to import it into other software, you need to choose “System default” (ANSI) if that software assumes Shift_JIS. If there’s no particular requirement, though, we recommend setting it to “UTF-8”, which is the most common encoding today.

Some actions, such as “Write text to file”, also let you choose UTF-8 without a BOM (byte order mark) as an option separate from “UTF-8”. Some software shows garbled characters depending on whether a BOM is present, so choose the option that matches the software you’re working with.