pub fn encoding_for_sort_id(sort_id: u8) -> Option<&'static Encoding>Expand description
Returns the encoding for a SQL collation identified by its SortId.
A collation with a non-zero SortId is a “SQL collation” (one of a
predefined set of sort orders); its code page is derived from the SortId,
not the LCID (MS-TDS Collation rule). For example
SQL_Latin1_General_CP1250_CS_AS has SortId 80 → windows-1250, while its
LCID would otherwise resolve to windows-1252.
Returns None for SortIds whose code page encoding_rs cannot represent
(the OEM code pages CP437 and CP850 are not in the WHATWG encoding set)
and for unknown SortIds. Table derived from the Microsoft/mssql-jdbc
SortId mapping.