How to remove the unexpected control character from the cells in csv file

Hi team,

I have some issues with a use case,

Like i will go through my use case as steps,

Step 1: am scrapping the table from a webpage and encoding type is “Windows-1252”.

while open the file everything is looks good.

but issue is i need to handle this csv file in python for some mainpulation and further process.While running this file in python environment. In every alternate line of the row cells some control characters is present like A^(exponentiation in above of A character) i found in internet that this was special character it will be not visible in the csv but you may encounter in code by using this file.

character looks exactly like this.

Help me to get out of this issue team,
It was eating my head, How can i handle this!!!


Hi Sriram,

you can check if the character also appears when you read the csv as a text file. With the UiPath Core activity “Read Text File” you can also select an encoding.

If you find this character in your output string, replace it with the string.Replace method in an Assign activity.
After removing the unwanted character use the Write Text File activity to save your string as a csv-file again.

Done, your csv-file should be clean now :man_astronaut:

Cheers, Lukas

Thanks @lukasziebold

No i am not able to find the character in the output string.

And also i tried various encoding types, now i am reading the csv line by line i am getting a newline character in each row. but i am reading using read csv -> datatable->Iterating using For each only even i am getting a newline character in every starting of the row i can string manipulate using replace method. But i want to know why the newline char is there while reading as datatable itself???