cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bstill Frequent Visitor
Frequent Visitor

Issues with Binary.FromText converting special characters

I am trying to convert text to Base64, but it doesn't seem to work with special characters. Here is the line of code:

 

Var = Binary.FromText("Key:Value", BinaryEncoding.Base64)

 

"KeyValue" - Converts just fine.

"Key:Value" - Gives the following error: Expression.Error: Invalid binary encoding.

 

Any help would be much apprciated.

1 ACCEPTED SOLUTION

Accepted Solutions
bstill Frequent Visitor
Frequent Visitor

Re: Issues with Binary.FromText converting special characters

The solution was to convert to Binary and then encode to Base64. It's still interesting that it doesn't handle special characters.

 

Var = "Key:Value",
VarBin = Text.ToBinary(Var),
VarBin64 = Binary.ToText(VarBin, BinaryEncoding.Base64),

View solution in original post

1 REPLY 1
bstill Frequent Visitor
Frequent Visitor

Re: Issues with Binary.FromText converting special characters

The solution was to convert to Binary and then encode to Base64. It's still interesting that it doesn't handle special characters.

 

Var = "Key:Value",
VarBin = Text.ToBinary(Var),
VarBin64 = Binary.ToText(VarBin, BinaryEncoding.Base64),

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)