C# - Create own Encoding for Roman8 charset

2019-05-24 06:45发布

问题:

The Roman8 charset is not supported by C#, but I need to use it properly (Encoding / Decoding strings), so I want to know what is the best method to create my own Encoding in order to support this Encoding?

Is that enough :

class Roman8Encoding : Encoding

What about Encoder ? Decoder ? EncoderFallback ? DecoderFallback ?

Any explanation on how do the job correctly is welcome.

Thanks !

回答1:

I don't have time to give details at the moment, but I created an Encoding implementation for EBCDIC. You could use that source code as a starting point. I wrote it a long time ago, so I would probably do various things differently these days - but it's a start...