C
C#9mo ago
kapetandzoni

✅ Using UTF-8 encoding

I got a very specific problem. Im writting an aplication in serbian. This is the main method public static void Main(string[] args) { Console.InputEncoding = System.Text.Encoding.UTF8; Console.OutputEncoding = System.Text.Encoding.UTF8; Console.WriteLine("Unesi nešto"); string unos = Console.ReadLine(); Console.WriteLine("Uneseno je :"+unos); } I can write nešto in console and it will write nešto just fine(nešto means something btw....) but when I do, CWL writes back neto instead of nešto. I just cant solve it and its staling me for past day. Pls help
6 Replies
Nothavid
Nothavid9mo ago
I don't think 'š' is included in the UTF8 char set. I have no clue why writing it works in that case but changing the input encoding to Unicode seems to fix it
kapetandzoni
kapetandzoniOP9mo ago
Thank you so... so much. I lost a whole day and it took you 10 minutes to respond. Thank you. It works
Nothavid
Nothavid9mo ago
glad i could help :)
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX9mo ago
Use the /close command to mark a forum thread as answered
kapetandzoni
kapetandzoniOP9mo ago
I didnt know that . Thank you guys
Want results from more Discord servers?
Add your server