pub fn utf16be_to_string_lossy(data: &[u8]) -> pdf::error::Result<String> {
    Ok(utf16be_to_char(data)
        .map(|r| r.unwrap_or(std::char::REPLACEMENT_CHARACTER))
        .collect())
}
/// converts UTF16-BE to a string replacing illegal/unknown characters
converts UTF16-BE to a string replacing illegal/unknown characters
converts UTF16 - BE to a string replacing illegal / unknown characters
pub fn utf16be_to_string_lossy(data: &[u8]) -> pdf::error::Result<String> {
    Ok(utf16be_to_char(data)
        .map(|r| r.unwrap_or(std::char::REPLACEMENT_CHARACTER))
        .collect())
}
pub fn utf16be_to_string_lossy ( data : & [ u8 ] ) -> pdf :: error :: Result < String > { Ok ( utf16be_to_char ( data ) . map ( | r | r . unwrap_or ( std :: char :: REPLACEMENT_CHARACTER ) ) . collect ( ) ) }
converts UTF16-BE to a string replacing illegal/unknown characters
converts UTF16 - BE to a string replacing illegal / unknown characters
data
&[u8]
data
&[u8]