1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Character encoding detection and conversion utilities for subtitle files.
//!
//! This module provides comprehensive tools for handling various character encodings
//! commonly found in subtitle files, including automatic detection and conversion
//! between different encoding formats.
//!
//! # Main Components
//!
//! - [`analyzer`] - Statistical analysis of file content for encoding detection
//! - [`charset`] - Character set definitions and encoding information
//! - [`converter`] - Encoding conversion functionality
//! - [`detector`] - High-level encoding detection interface
//!
//! # Examples
//!
//! ```rust,ignore
//! use subx_cli::core::formats::encoding::{EncodingDetector, EncodingConverter, Charset};
//!
//! // Detect encoding of a subtitle file
//! let detector = EncodingDetector::new()?;
//! let content = std::fs::read("subtitle.srt")?;
//! let detected = detector.detect_encoding(&content)?;
//!
//! // Convert to UTF-8 if needed
//! if detected.charset != Charset::Utf8 {
//! let converter = EncodingConverter::new();
//! let converted = converter.convert_to_utf8(&content, &detected.charset)?;
//! println!("Converted {} bytes", converted.bytes_processed);
//! }
//! ```
/// Statistical analysis of file content for encoding detection
/// Character set definitions and encoding information
/// Encoding conversion functionality
/// High-level encoding detection interface
pub use ;
pub use ;
pub use ;
pub use EncodingDetector;