TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bwana Lawi
NA
2
23.2k
Printing unicode to console in C#
Sep 16 2017 7:56 AM
I can't get the Console to print unicode characters using the Console.WriteLine or Console.Out.WriteLine. After searching the Internet, I found two suggestions.
Console.OutputEncoding = Encoding.UTF8;
// Option 1 for setting encoding
Console.WriteLine(
"Smiley face: ????"
);
Console.OutputEncoding = System.Text.Encoding.UTF8;
//Option 2
Console.WriteLine(
"Smiley face: ????"
);
Problem is that both these approaches give the same error below:
Smiley face: ????
Exception thrown: 'System.IO.IOException' in mscorlib.dll
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
The handle is invalid.
I have changed the console font to Lucida Console but still the unicode characters are not being printed
Environment:
IDE: VS Community version, 2017, Version 15.3.4
Windows 10
Reply
Answers (
2
)
How to search db value with 'or' condition sql server
when i click comments button than more comments are add