Welcome to mirror list, hosted at ThFree Co, Russian Federation.

UTF8Encoding.cs « System.Text « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4f1e58a3f5f4aa6941e47b001d2c06366e367ee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// System.Text.UTF8Encoding.cs
//
// Authors:
//   Sean MacIsaac (macisaac@ximian.com)
//   Dietmar Maurer (dietmar@ximian.com)
//
// (C) Ximian, Inc.  http://www.ximian.com
//

namespace System.Text
{
	[Serializable]
	public class UTF8Encoding : Encoding
	{
		public UTF8Encoding () : base ("UTF-8", false)
		{
			encoding_name = "Unicode (UTF-8)";
			body_name = "utf-8";
			header_name = "utf-8";
			web_name = "utf-8";
			is_browser_display = true;
			is_browser_save = true;
			is_mail_news_display = true;
			is_mail_news_save = true;
		}
		
		public override int GetMaxByteCount (int charCount)
		{
			return charCount*6;
		}

		public override int GetMaxCharCount (int byteCount)
		{
			return byteCount;
		}
	}
}