Answers for "encode string in utf8 c#"

PHP
2

utf8 encode php

$a = "Não";
  
echo utf8_encode($a);
Posted by: Guest on December-10-2020
0

.net return result encoding as utf8

private async Task<string> ResponseMessageAsync(HttpResponseMessage result)
{
    string message = await result.Content.ReadAsStringAsync();
    string parsedString = Regex.Unescape(message);
    byte[] isoBites = Encoding.GetEncoding("ISO-8859-1").GetBytes(parsedString);
    return Encoding.UTF8.GetString(isoBites, 0, isoBites.Length);
 }
Posted by: Guest on November-11-2021

Browse Popular Code Answers by Language