Hebrew.EBCDIC2Unicode.Converter
2.0.0-alpha
This is a prerelease version of Hebrew.EBCDIC2Unicode.Converter.
dotnet add package Hebrew.EBCDIC2Unicode.Converter --version 2.0.0-alpha
NuGet\Install-Package Hebrew.EBCDIC2Unicode.Converter -Version 2.0.0-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hebrew.EBCDIC2Unicode.Converter" Version="2.0.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hebrew.EBCDIC2Unicode.Converter" Version="2.0.0-alpha" />
<PackageReference Include="Hebrew.EBCDIC2Unicode.Converter" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hebrew.EBCDIC2Unicode.Converter --version 2.0.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hebrew.EBCDIC2Unicode.Converter, 2.0.0-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hebrew.EBCDIC2Unicode.Converter@2.0.0-alpha
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hebrew.EBCDIC2Unicode.Converter&version=2.0.0-alpha&prerelease
#tool nuget:?package=Hebrew.EBCDIC2Unicode.Converter&version=2.0.0-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Hebrew.EBCDIC2Unicode.Converter
A production-ready .NET library for converting between EBCDIC (Extended Binary Coded Decimal Interchange Code) and UTF-8 encodings, with specialized support for Hebrew text processing.
๐ Features
- ๐ Unified API: Single public method with clean interface
- ๐ Multi-Codepage Support: Hebrew Custom, IBM500, IBM037, IBM424
- ๐ Production Ready: Comprehensive error handling and validation
- โก High Performance: Optimized for large-scale text processing
- ๐ง .NET 8: Built on the latest LTS framework
- ๐ Well Documented: Complete XML documentation included
๐ฆ Installation
Package Manager Console
Install-Package Hebrew.EBCDIC2Unicode.Converter -Version 2.0.0-alpha
.NET CLI
dotnet add package Hebrew.EBCDIC2Unicode.Converter --version 2.0.0-alpha
PackageReference
<PackageReference Include="Hebrew.EBCDIC2Unicode.Converter" Version="2.0.0-alpha" />
๐ง Quick Start
using HebrewEBCDIC3Unicode.Converter;
// Create converter instance
var converter = new HebrewEbcdicConverter();
// Method 1: Convert EBCDIC byte array to UTF-8 (recommended)
byte[] ebcdicBytes = { 0x41, 0x42, 0x40, 0xC8, 0x85, 0x93, 0x93, 0x96 }; // ืื Hello
string result = converter.ConvertEbcdicToUtf8(ebcdicBytes);
// Output: "ืื Hello"
// Method 2: Convert EBCDIC string (containing raw bytes) to UTF-8
string ebcdicString = HebrewEbcdicConverter.CreateEbcdicStringFromBytes(ebcdicBytes);
string result2 = converter.ConvertEbcdicToUtf8(ebcdicString);
// Output: "ืื Hello"
// Method 3: Convert hex string to UTF-8 (utility method)
string hexResult = converter.ConvertHexStringToUtf8("4142 40C8 8593 9396");
// Output: "ืื Hello"
// Convert with specific codepage
string ibmResult = converter.ConvertEbcdicToUtf8(ebcdicBytes, EbcdicCodepage.IBM500);
// Output: " รข Hello"
๐ Supported Codepages
Codepage | Description | Best For |
---|---|---|
HebrewCustom |
Optimized Hebrew character mapping | Hebrew text processing |
IBM500 |
IBM EBCDIC International | International applications |
IBM037 |
IBM EBCDIC US-Canada | North American systems |
IBM424 |
IBM EBCDIC Hebrew | IBM Hebrew systems (with .NET limitations) |
๐ Advanced Usage
Working with Different Input Formats
// Working with byte arrays (most efficient)
byte[] ebcdicData = GetEbcdicDataFromMainframe();
string utf8Result = converter.ConvertEbcdicToUtf8(ebcdicData);
// Working with .NET strings containing raw EBCDIC bytes
string ebcdicAsString = GetEbcdicStringFromLegacySystem();
string utf8Result2 = converter.ConvertEbcdicToUtf8(ebcdicAsString);
// Working with hex strings (for testing/debugging)
string hexString = "4142 40C8 8593 9396";
string utf8Result3 = converter.ConvertHexStringToUtf8(hexString);
Error Handling
try
{
byte[]? nullBytes = null;
var result = converter.ConvertEbcdicToUtf8(nullBytes!);
}
catch (ArgumentNullException ex)
{
// Handle null input
Console.WriteLine($"Null input: {ex.Message}");
}
try
{
var result = converter.ConvertHexStringToUtf8("invalid hex");
}
catch (ArgumentException ex)
{
// Handle invalid hex string
Console.WriteLine($"Invalid hex: {ex.Message}");
}
Batch Processing
var ebcdicDataList = new List<byte[]> { /* your EBCDIC byte arrays */ };
var results = ebcdicDataList
.Select(bytes => converter.ConvertEbcdicToUtf8(bytes))
.ToList();
Round-trip Conversion
string originalText = "ืื Hello 123";
byte[] ebcdicBytes = converter.ConvertFromUtf8(originalText);
string convertedBack = converter.ConvertEbcdicToUtf8(ebcdicBytes);
bool isIdentical = originalText == convertedBack; // Should be true
IBM-424 Handling
// IBM-424 has .NET limitations - graceful handling
var result = converter.ConvertEbcdicToUtf8(ebcdicBytes, EbcdicCodepage.IBM424);
// Returns: "[Codepage 424 not supported by Microsoft .NET - consider using HebrewCustom mapping]"
๐ Character Mapping Details
Hebrew Characters (HebrewCustom)
- Hebrew Letters (ื-ืช): Optimized mapping for modern Hebrew text
- Final Forms: Support for final letter forms (ื, ื, ื, ืฃ, ืฅ)
- Special Characters: Hebrew-specific punctuation and symbols
English & Numbers
- English Letters: Standard EBCDIC uppercase/lowercase mapping
- Numbers (0-9): Standard EBCDIC numeric mapping (0xF0-0xF9)
- Special Characters: Spaces, periods, apostrophes, and common symbols
๐๏ธ Technical Implementation
Why Not System.Text.Encoding?
This library provides custom Hebrew EBCDIC mapping because:
- Microsoft .NET Limitations: Limited EBCDIC codepage support
- Hebrew Optimization: Custom mapping optimized for Hebrew text
- Legacy System Support: Compatibility with mainframe Hebrew data
- Production Reliability: Handles edge cases and invalid input gracefully
- Raw Byte Processing: Works directly with EBCDIC byte data, not hex representations
Performance Characteristics
- Memory Efficient: Minimal allocations during conversion
- Thread Safe: Converter instances can be used concurrently
- Validation: Input validation prevents runtime errors
๐งช Testing & Quality
This library includes comprehensive testing:
- โ Round-trip Testing: Ensures conversion accuracy
- โ Error Handling: Invalid input validation
- โ Performance Testing: Large-scale processing verification
- โ Multi-codepage Testing: All supported codepages verified
๐ Real-World Applications
- Mainframe Data Migration: Converting legacy Hebrew EBCDIC data
- Banking Systems: Processing Hebrew transaction data from IBM systems
- Government Systems: Converting Hebrew administrative data
- Database Integration: ETL processes with Hebrew EBCDIC sources
๐ Requirements
- .NET 8.0 or later
- System.Text.Encoding.CodePages (automatically included)
๐ค Contributing
This project welcomes contributions! Areas of interest:
- Additional EBCDIC codepage support
- Performance optimizations
- Enhanced Hebrew text processing
- Documentation improvements
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Related Projects
- HebrewEBCDIC3Unicode: Complete solution with DB2 integration
- Unified API Example: Comprehensive usage guide
๐ Support
- Issues: GitHub Issues
- Documentation: Project README
- Examples: API Documentation
Made with โค๏ธ for the Hebrew text processing community
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- System.Text.Encoding.CodePages (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.0.0-alpha | 109 | 7/13/2025 |