Struct encoding::codec::korean::Windows949Encoding [] [src]

pub struct Windows949Encoding;

Windows code page 949.

This is a Korean encoding derived from EUC-KR, which is so widespread that most occurrences of EUC-KR actually mean this encoding. Unlike KS X 1001 (and EUC-KR) which only contains a set of 2,350 common Hangul syllables, it assigns remaining 8,822 Hangul syllables to the two-byte sequence which second byte have its MSB unset (i.e. [81-C6] [41-5A 61-7A 81-FE]). Its design strongly resembles that of Shift_JIS but less prone to errors since the set of MSB-unset second bytes is much limited compared to Shift_JIS.

Trait Implementations

impl Encoding for Windows949Encoding

fn name(&self) -> &'static str

fn whatwg_name(&self) -> Option<&'static str>

fn raw_encoder(&self) -> Box<RawEncoder>

fn raw_decoder(&self) -> Box<RawDecoder>

fn encode(&self, input: &str, trap: EncoderTrap) -> Result<Vec<u8>, Cow<'static, str>>

fn encode_to(&self, input: &str, trap: EncoderTrap, ret: &mut ByteWriter) -> Result<(), Cow<'static, str>>

fn decode(&self, input: &[u8], trap: DecoderTrap) -> Result<String, Cow<'static, str>>

fn decode_to(&self, input: &[u8], trap: DecoderTrap, ret: &mut StringWriter) -> Result<(), Cow<'static, str>>

Derived Implementations

impl Copy for Windows949Encoding

impl Clone for Windows949Encoding

fn clone(&self) -> Windows949Encoding

fn clone_from(&mut self, source: &Self)