string_to_multibyte

Function string_to_multibyte 

Source
pub fn string_to_multibyte(
    codepage: DWORD,
    data: &str,
    default_char: Option<u8>,
) -> Result<Vec<u8>>
Expand description

Convert String to 8-bit string.

  • codepage - Code page to use in performing the conversion. This parameter can be set to the value of any code page that is installed or available in the operating system.
  • data - Source string.
  • default_char - Optional character for replace to use if a character cannot be represented in the specified code page.

Returns Err if an invalid input character is encountered and default_char is None.