[Info-vax] What to do with my VAX.....
Arne Vajhøj
arne at vajhoej.dk
Fri Nov 20 17:32:57 EST 2020
On 11/20/2020 1:49 PM, Simon Clubley wrote:
> As an aside, I wonder how many people today even know that EBCDIC exists
> when it comes to talking about alternate ways to store data ?
Know EBCDIC specifically? Probably only a small bunch of guys over 50.
Know that data can be stored differently and be able to
get a list of what is possible in their environment? Millions!
import java.nio.charset.Charset;
import java.util.Map.Entry;
public class CharsetList {
public static void main(String[] args) {
for(Entry<String,Charset> e :
Charset.availableCharsets().entrySet()) {
System.out.println(e.getKey() + " = " +
e.getValue().aliases());
}
}
}
list 156 encodings including 10 flavors of EBCDIC
with Java 5 on VMS.
(and 170 including 21 flavors of EBCDIC with Java 8
on Windows)
using System;
using System.Text;
namespace E
{
public class Program
{
public static void Main(string[] args)
{
foreach(EncodingInfo ei in Encoding.GetEncodings())
{
Console.WriteLine(ei.Name + " = " + ei.DisplayName);
}
Console.ReadKey();
}
}
}
list 140 encodings including 31 flavors of EBCDIC with
.NET 4 on Windows.
Arne
More information about the Info-vax
mailing list