Enum msi::CodePage
[−]
[src]
pub enum CodePage {
Windows1250,
Windows1251,
Windows1252,
Windows1253,
Windows1254,
Windows1255,
Windows1256,
Windows1257,
Windows1258,
MacintoshRoman,
MacintoshCyrillic,
UsAscii,
Iso88591,
Iso88592,
Iso88593,
Iso88594,
Iso88595,
Iso88596,
Iso88597,
Iso88598,
Utf8,
}A Windows code page.
Code pages are a legacy Windows mechanism for representing character encodings, but are still used within the MSI file format.
Not all Windows code pages are supported by this library yet. See Wikipedia for a complete list of valid code pages.
Variants
Windows1250Windows1251Windows1252Windows1253Windows1254Windows1255Windows1256Windows1257Windows1258MacintoshRomanMacintoshCyrillicUsAsciiIso88591Iso88592Iso88593Iso88594Iso88595Iso88596Iso88597Iso88598Utf8Methods
impl CodePage[src]
fn from_id(id: i32) -> Option<CodePage>
Returns the code page (if any) with the given ID number.
fn id(&self) -> i32
Returns the ID number used within Windows to represent this code page.
fn name(&self) -> &str
Returns a human-readable name for this code page.
fn decode(&self, bytes: &[u8]) -> String
Decodes a byte array into a string, using this code page. Invalid characters will be replaced with a Unicode replacement character (U+FFFD).
fn encode(&self, string: &str) -> Vec<u8>
Encodes a string into a byte array, using this code page. For
non-Unicode code pages, any characters that cannot be represented will
be replaced with a code-page-specific replacement character (typically
'?').
Trait Implementations
impl Clone for CodePage[src]
fn clone(&self) -> CodePage
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Copy for CodePage[src]
impl Debug for CodePage[src]
impl Eq for CodePage[src]
impl PartialEq for CodePage[src]
fn eq(&self, __arg_0: &CodePage) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.