Is there anyway i can use some custom encoding or convert some base16 characters (two bytes chars as in japanese SHIFT-JIS) when reading them using binaryreader ? i mean, while reading them, like, if there is a 0x00ff it converts it to "\et", when reading and when writing as well (editing the file, and writing using binarywriter).
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
I think you want to implement your own Encoding and Decoding, so the problem is related to how you implement them, that depends on your algorithm. The default
Encoding
supports only popular encodings such asUnicode, BigEndianUnicode, UTF-8, ...
. I suggested that you don't need any kind of custom Encoding, as you can seeEncoding
is just a class with some methods to perform the actualencoding
anddecoding
, it helps you a lot in handling with the well-known, popular encodingsUnicode
, ... but for your own Encoding, you must implement almost all the core functions like this:Hope it helps!