title: ISO_IR 58 support in .Net 4.0
body: <p>There is a double byte character set in DICOM named ISO_IR 58. As far as I can tell the equivalent encoding for this in .Net is gb2312. I am trying to encode ISO_IR 58 characters in 7 bit ASCII for communication between medical systems. </p>
  
  <p>In the java world the string gb2312 works to do this encoding.</p>
  
  <p>First look at this example for ISO_IR 87 (ISO_IR 87 equals iso-2022-jp in .Net):</p>
  
  <pre><code>Encoding enc = Encoding.GetEncoding("iso-2022-jp");
  byte[] bytes = enc.GetBytes("叙収參参^去厰厦厘=却占^卮博南");
  string asciistring = ASCIIEncoding.ASCII.GetString(bytes);
  </code></pre>
  
  <p>This takes the input string and gives the ASCII string: $B=v&lt;}RT;2(B^$B5nRRRONR(B=$B5Q@j(B^$BRHGnFn(B</p>
  
  <p>with all proper escape sequences with which I can use correctly.</p>
  
  <p>(the actual first escape character does not display here but the rest of the sequence does when pasted)</p>
  
  <p>If I use this code with characters from ISR_IR 58:</p>
  
  <pre><code>Encoding enc = Encoding.GetEncoding("gb2312");
  byte[] bytes = enc.GetBytes("ㄆㄉㄊㄋ^ㄌㄍㄐㄓ^ㄖㄠㄢㄤ");
  string asciistring = ASCIIEncoding.ASCII.GetString(bytes);
  </code></pre>
  
  <p>I only get the string: ????????^????????^????????</p>
  
  <p>So what is the answer to DICOM ISO_IR 58 encoding using .Net? Am I using the wrong string for encoding? Is ISO_IR 58 in DICOM not supported in .Net? Is there a bug in .Net? Is it even possible?</p>