How to set the utf-8 encoding saved to a txt file  SOLVED

User-to-User discussion about the PhraseExpress macro programming.
Post Reply
kewin
Posts: 23
Joined: 17 Dec 20, 02:45

How to set the utf-8 encoding saved to a txt file

Post by kewin » 31 Dec 20, 00:43

hello everyone,

I use the following code to output a TXT file, but by default, the text encoding format is ANSI. When I open it in some software, Some of the text will be displayed as garbled,Please see the picture below
Image

How to save the txt file use UTF-8 encoding format? this is a very useful format, otherwise all my tasks cannot be completed

Any suggestions are welcome. Thank you in advance

Code: Select all

{#output -target C:\Users\Administrator\Desktop\test.txt -content "Hello World! 你好,世界!" -variablename Output to file}

Technical Support
Posts: 2798
Joined: 10 Feb 06, 22:23

Post by Technical Support » 11 Jan 21, 09:58

It is not possible to define the encoding, but it is a good idea to add such an option. We will consider this possibility for future releases.

kewin
Posts: 23
Joined: 17 Dec 20, 02:45

Post by kewin » 12 Jan 21, 07:30

@Technical Support
This is a very useful feature for Asian countries. I look forward to updating soon, thank you very much.

Post Reply