Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was looking for a general way to solve this problem instead of focusing on just EBCDIC 37, and I didn't want to visually compare two charts of codes. I wrote a short program (in VB.NET) to find all of the characters that exist in one codepage and not the other.</p> <pre><code>' Pick source and target codepages. Dim sourceEncoding As Encoding = Encoding.Default ' This is Windows 1252 on Windows OS. Dim targetEncoding As Encoding = Encoding.GetEncoding("IBM037") ' Get every character in the codepage. Dim inbytes(256) As Byte For code As Integer = 0 To 255 inbytes(code) = Convert.ToByte(code) Next ' Convert the bytes from the source encoding to the target, then back again. ' Those bytes that convert back to the original value exist in both codepages. ' The bytes that change do not exist in the target encoding. Dim input As String = sourceEncoding.GetString(inbytes) Dim outbytes As Byte() = Encoding.Convert(sourceEncoding, targetEncoding, inbytes) Dim convertedbytes As Byte() = Encoding.Convert(targetEncoding, sourceEncoding, outbytes) Dim output As String = sourceEncoding.GetString(convertedbytes) Dim diffs As New List(Of Char)() For idx As Integer = 0 To input.Length - 1 If input(idx) &lt;&gt; output(idx) Then diffs.Add(input(idx)) End If Next ' Print results. Console.WriteLine("Source: " + input) Console.WriteLine("(Coded): " + String.Join(" ", inbytes.Select(Function (x) Convert.ToInt32(x).ToString()).ToArray())) Console.WriteLine() Console.WriteLine("Target: " + output) Console.WriteLine("(Coded): " + String.Join(" ", convertedbytes.Select(Function (x) Convert.ToInt32(x).ToString()).ToArray())) Console.WriteLine() Console.WriteLine("Cannot convert: " + String.Join(" ", diffs.Select(Function (x) Convert.ToInt32(x).ToString()).ToArray())) </code></pre> <p>For the case of Windows 1252 to EBCDIC 37, there are 27 characters that do not map. I chose what I thought was the best equivalent for those characters.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload