C# ToBase64String XML

Markus Freitag 3,791 Reputation points
2021-10-06T15:46:49.187+00:00

Hello,

to get converted code readable.

// XML
 isActive="true" written="QjQ0QTA0OTQ3Mg==" read="QjQ0QTA0OTQ3Mg=="

// Code C# Convert
 codeWritten = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(codeWritten));
 
 

Is there a tool a way to get this string readable?
Notepad++ ?

So that I can save control characters as XML I have to convert them.

Or I would have to write my own tool.
Or about a browser that recognizes that?

Thanks for tips and hints in advance.

Developer technologies ASP.NET Other
Developer technologies C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-10-06T16:20:46.603+00:00

    there is no native xml support for base64 strings.

    you can use notepad++ to decode (select and decode) and there are websites that you can paste a base64 string and decode.

    but why are you using base64 instead of xml encoding of control characters?

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.