How to chnage utf -8 to Utf -8 with bom

Hello,

i have requirement where i need to open csv as notepad and save that file with notepad with encoding utf with bom. utf -8 with bom option is not there in my notepad.

can you help me with same , how can i achieve this.

@Mathkar_kunal

Activities:
Start Process:

  • FileName: “C:\path\to\your\file.csv”
  • UseShellExecute: True
  • CreateNoWindow: False

Delay (Optional)

Type Into:

  • Text: “^(+{F10})E”

Delay (Optional)

Type Into:

  • Text: “{DOWN 3}{ENTER}”

Delay (Optional)

Type Into:

  • Text: “{BOM}”

Type Into:

  • Text: “~”

i cannot see below options in start process activity

  • UseShellExecute: True
  • CreateNoWindow: False

Any specific reasons to do the character encoding change via Notepad and not by:

  • File.ReadAllText
  • File.WriteAllText along with configured encoding
    OR
    Text Read/ Write Activities

@Mathkar_kunal

This will work for you try this

Assign csvWithBOM = ChrW(&HEF) + ChrW(&HBB) + ChrW(&HBF) + YourReadTextString

if utf-8 with bom iis not there in notepad option , still it will save ?

@Mathkar_kunal

I hope so, Try it worked for me

The notepad file is saved in UTF-8 With Bom

u have mentioned “assign csvWithBOM = ChrW(&HEF) + ChrW(&HBB) + ChrW(&HBF) + YourReadTextString” csvwithBOM varaible and mentioned Res_String in workflow.
what is there in read file -csv file?

@Mathkar_kunal

Yes,
Res_String= ChrW(&HEF) + ChrW(&HBB) + ChrW(&HBF) + YourReadTextString”

@Mathkar_kunal

If you got the result please mark it as “Solution”

file generated but with no extension
how to know file is with utf 8 bom or not

@Mathkar_kunal

Open your generated output file
Notepad files are store in .txt extension
Open the output file in click on “File” and then “save as” in that you able to see

Follow this procedure you are able to know the “extension” and encoding type

opening generated file but no utf 8 bom option

@Mathkar_kunal

But my encoding type is “UTF-8 with bom” why it differs you

Hi @Mathkar_kunal

Try this:

Uploaded the xaml file for reference too.

Sequence3.xaml (7.0 KB)

Hope it works!!

@Mathkar_kunal

If you find solution for this Query please mark it as solution to close the loop.

Happy Automation
Regards,

@Mathkar_kunal

Instead of “UTF-8” give “UTF-8 with BOM”

I hope it works