Skip to main content

text_encoding_for_language

Function text_encoding_for_language 

Source
pub fn text_encoding_for_language(
    language_id: impl Into<LanguageId>,
) -> Result<TextEncoding, LanguageEncodingError>
Expand description

Resolves the text encoding for a KotOR language ID.

This mapping is shared by TLK and GFF localized-string paths so behavior stays centralized and avoids cross-crate drift.

ยงErrors

LanguageEncodingError for language IDs 70 through 72, the Armenian, Georgian and Tamil legacy codepages, which are the only ones deliberately left unmapped. Every other unrecognised ID falls back to Windows-1252 rather than failing.