I have a code as mentioned below. I have a "inputText" variable which contains the string as well as some new line characters. Just assume my variable inputText contains something like "Test\nTest". So when I get final output I need to remove \n new line char from the string.
currentText =
Encoding.UTF8.GetString(Encoding.Convert(
Encoding.Default,
Encoding.UTF8,
Encoding.Default.GetBytes(inputText)));