MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getEncodingName

Function getEncodingName

src/utils/encodings.js:159–167  ·  view source on GitHub ↗
(charset)

Source from the content-addressed store, hash-verified

157 * @returns {string}
158 */
159export function getEncodingName(charset) {
160 if (!charset) {
161 charset = settings.value.defaultFileEncoding;
162 }
163
164 if (charset === "auto") charset = "UTF-8";
165
166 return getEncoding(charset).name;
167}
168
169/**
170 * Decodes arrayBuffer to String according given encoding type

Callers 4

readFileFunction · 0.90
writeFileFunction · 0.90
decodeFunction · 0.85
encodeFunction · 0.85

Calls 1

getEncodingFunction · 0.85

Tested by

no test coverage detected