Skip to main content

decode_text

Function decode_text 

Source
pub fn decode_text(raw: &[u8]) -> String
Expand description

バイト列をテキストにする: BOM(UTF-16 LE/BE・UTF-8)→ BOM なしで UTF-8 として正しければ UTF-8 → Shift_JIS として 誤りなく読めれば Shift_JIS → Windows-1252。以前は BOM のないものを 1 バイト = 1 文字(Latin-1)で読み、UTF-8・ CP932 の日本語の面の名前が化けたまま UTF-16 で保存されていた