MichelMichels.Text.ITA1
1.2.0
dotnet add package MichelMichels.Text.ITA1 --version 1.2.0
NuGet\Install-Package MichelMichels.Text.ITA1 -Version 1.2.0
<PackageReference Include="MichelMichels.Text.ITA1" Version="1.2.0" />
paket add MichelMichels.Text.ITA1 --version 1.2.0
#r "nuget: MichelMichels.Text.ITA1, 1.2.0"
// Install MichelMichels.Text.ITA1 as a Cake Addin #addin nuget:?package=MichelMichels.Text.ITA1&version=1.2.0 // Install MichelMichels.Text.ITA1 as a Cake Tool #tool nuget:?package=MichelMichels.Text.ITA1&version=1.2.0
ITA1 ðŸ”
This project contains a derived C# class of System.Text.Encoding
for the original version of International Telegraph Alphabet no 1 (ITA1) (aka Baudot Code).
<details>
<summary>Table of Contents</summary>
</details>
Prerequisites
Building
Use Visual Studio 2022 to build the project.
Installation
Get the NuGet package from nuget.org or search for MichelMichels.Text.ITA1
in the GUI package manager in Visual Studio.
You can also use the cli of the package manager with following command:
Install-Package MichelMichels.Text.ITA1
<br /> <hr>
Usage
[!WARNING] This is an opinionated project and as such, I made the decision of not allowing lowercase letters. This decision has the consequence that lowercase characters will not be converted to their equivalent uppercase character encoded byte, they will just be left out. This leads to loss of data when encoding and decoding.
Below is a short example on how to use this Ita1Encoding
class.
using MichelMichels.Text;
Encoding ita1 = new Ita1Encoding();
// Encoding characters
byte[] bytes = ita1.GetBytes("HELLO WORLD");
// Decoding bytes
string value = ita1.GetString([0x0B, 0x02, 0x1B, 0x1B, 0x07, 0x10, 0x16, 0x07, 0x1C, 0x1B, 0x0F]);
Following example writes and reads text encoded in ITA1 to and from a text file.
using MichelMichels.Text;
Encoding ita1 = new Ita1Encoding();
// Writing
File.WriteAllText("output.txt", "HELLO WORLD", ita1);
// Reading
string data = File.ReadAllText("output.txt", ita1);
Credits
- Written by Michel Michels.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.