-
-
Save ztirom/8f9a2f981d0ec41d467abc5c5f371291 to your computer and use it in GitHub Desktop.
Make a byte64 String from an UTF-8 String in AX2012
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void strToBase64Str(Args _args) | |
{ | |
System.Byte[] byte; | |
str strUTF8Input = "AX2012R3CU9", | |
str64; | |
System.Text.Encoding encoding = System.Text.Encoding::get_UTF8(); | |
// UTF8 input | |
byte = encoding.GetBytes(strUTF8Input); | |
// base64 Output | |
str64 = System.Convert::ToBase64String(byte); | |
// result | |
info(strFmt("UTF8 input: %1", strUTF8Input)); | |
info(strFmt("base64: %1", str64)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment