confused by the encoding stuff. are Encoding.UTF8.GetBytes and Convert.FromBase64String are the same?
confused by the encoding stuff. are Encoding.UTF8.GetBytes and Convert.FromBase64String are the same?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
er… no.
Base64is a particular way of encoding binary data in an ASCII (7-bit) stream, usually for transmitting through some other media (email, etc…).UTF8is the way of encoding Unicode text as a series of bytes without having to use multiple characters for 7-bit ASCII characters.In other words: One is for binary data, the other is for text.
Side note: Strings in .NET are already in UTF16, and there are other methods for writing to files and streams as UTF8.