C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,906 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I need to get the Encoding from a string which is a valid string : Encoding.EncodingName
ie: Korean (EUC) or Central European (Windows)
Having this string, how to get the proper encoding?
Encoding.GetEncoding("Central European (Windows)") will not work.
Thanks
Try this:
Encoding encoding = Encoding.GetEncodings( ).First( e => e.DisplayName == "Korean (EUC)" ).GetEncoding( );