Notifications
Announcements
Hi,
I imported a tab-separated file into an instant flow. However, instead of the text, I am seeing a string of gibberish characters. How can I do to get the actual text as seen in the file?
Thanks in advance!
Hi @JLKM ,
You could use base64toString function.
Best Regards,
Wearsky
HI Wearsky
Unfortunately, this didn't work.
Now I wonder if it has something to do with the file encoding. I just noticed that my file (when opened with Notepad) is of UTF-16 instead of UTF-8?
Would you know anything about this?
Thanks a mil!
Yes, the root cause is the utf-16.
At my knowldege , powerautomate cannot process utf-16 files.
Hi Wearsky
Do you know if there is any way or function to decode?
After using decodeBase64(), I got another set of gibberish like this:
Is it possible to decode this?
Thank you
As far as I know, power automate can display Utf-8 encoded strings. So when your text file is in utf-16 encoded format, it will parse it incorrectly, i.e. garbled.
Maybe some 3rd party connectors or apis support utf-16.
Found this thread: https://powerusers.microsoft.com/t5/Building-Flows/Parse-CSV-error/td-p/1315339
So, I tried Sharepoint 'Create file' action with the triggerBody()?['file']?['contentBytes'] and a different file name and a .txt extension. Then 'Get file content' with the Id from Create file. I was able to see the content as intended, no more garbled.
Is there a way to change the extension on the fly without going through Sharepoint or OneDrive?
Thanks
Smart solution! I think It uses sharepoint api to convert utf-16 text files to utf-8 encoding format in flow.
To be honest, I don't have a better idea.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 522 Super User 2025 Season 2
Tomac 364 Moderator
abm abm 243 Most Valuable Professional