Skip to main content

decode_text_string

Function decode_text_string 

Source
pub fn decode_text_string(bytes: &[u8]) -> String
Expand description

Decodes a text string: UTF-16BE with a BOM, UTF-8 with a BOM (PDF 2.0), otherwise PDFDocEncoding. UTF-16LE with a BOM, which some writers emit, is accepted too. Undecodable units become U+FFFD.