diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs index b1126af426..464366de6a 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs @@ -121,7 +121,7 @@ namespace MonoDevelop.Projects.Text PropertyService.SaveProperties (); } } - + public static TextEncoding GetEncoding (string id) { foreach (TextEncoding e in SupportedEncodings) { @@ -130,6 +130,15 @@ namespace MonoDevelop.Projects.Text } return null; } + + public static TextEncoding GetEncoding (int codePage) + { + foreach (TextEncoding e in SupportedEncodings) { + if (e.CodePage == codePage) + return e; + } + return null; + } public static string DefaultEncoding { get { return "UTF-8"; } |