Skip to content

i2van/UnicodeCharsetDetector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnicodeCharsetDetector

Latest build NuGet Downloads License

Table of Contents

Description

Text files Unicode charset w/wo BOM detector. Encodings supported:

  • UTF-7
  • UTF-8
  • UTF-16
  • UTF-32

Website

Download

NuGet

Example

Example application can be found here.

// Get file encoding.

var unicodeCharsetDetector = new UnicodeCharsetDetector.UnicodeCharsetDetector();

using var stream = File.OpenRead(fileName);

var charset = unicodeCharsetDetector.Check(stream);
var encoding = charset.ToEncoding();

License