Skip to main content

Notifications

Power Automate - Building Flows
Answered

base64ToString function has unexpected character in the output

Posted on by

Hi Folks,

 

I'm trying to get the contents of an html file attachment using the function base64ToString. It provides me the output but has a special character "�" between all characters as below:

 

rbn_nue_0-1657256847686.png

 

When I tried decoding the same input content bytes from https://www.base64decode.org/ it provided me the accurate output. Could anyone help to get the right output from power automate?

 

Thank you. 

  • rbn_nue Profile Picture
    rbn_nue on at
    Re: base64ToString function has unexpected character in the output

    Hi @MarconettiMarco ,

     

    Thank you for the response. I had already tried this, it will only replace first occurrence of the character. Using apply to each did not make much difference as well. I used get file content (OneDrive) to solve the issue. 

     

    Thank you. 

  • Verified answer
    rbn_nue Profile Picture
    rbn_nue on at
    Re: base64ToString function has unexpected character in the output

    Hi,

     

    I used below workaround to solve the issue:

     

    • Save this html document as new file in OneDrive.
    • Use get file content (OneDrive) to get the html content inside - this provided accurate output.
    • Delete the file afterwards.

    Thank you. 

  • MarconettiMarco Profile Picture
    MarconettiMarco 3,822 on at
    Re: base64ToString function has unexpected character in the output

    hello @rbn_nue ,

    please use the following expression in a "Compose" action:

     

    replace(outputs('Compose'),'�','')

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    BR,

    Marco

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.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard