**** Merged from MCS ****
[mono-project.git] / mcs / class / I18N / CJK / DbcsConvert.cs
blob99f023d2de25a5146ea65931ec0a2454e8a04328
1 //
2 // I18N.CJK.DbcsConvert
3 //
4 // Author:
5 // Alan Tam Siu Lung (Tam@SiuLung.com)
6 //
8 using System;
10 namespace I18N.CJK
12 // This class assists other DBCS encoding classes in converting back
13 // and forth between JIS character sets and Unicode. It uses
14 // several large tables to do this, some of which are stored in
15 // the resource section of the assembly for efficient access.
16 internal class DbcsConvert
18 // Public access to the conversion tables.
19 public byte[] n2u;
20 public byte[] u2n;
22 // Constructor.
23 internal DbcsConvert(string fileName) {
24 using (CodeTable table = new CodeTable(fileName)) {
25 n2u = table.GetSection(1);
26 u2n = table.GetSection(2);