Skip to main content

core.doc.encodings

Helper functions to change a document encoding.

local encodings = require "core.doc.encodings"

groups​

(field) groups: table<integer, string>

List of encoding regions.


list​

(field) list: table<integer, encodings.encoding[]>

Supported iconv encodings grouped by region.


encodings.encoding​

charset​

(field) charset: string

name​

(field) name: string

get_all​

function core.doc.encodings.get_all()
-> encodings.encoding[]|nil

Get a list of all encodings.

@return: encodings.encoding[]|nil


get_group​

function core.doc.encodings.get_group(label: string)
-> encodings.encoding[]|nil

Get the list of encodings associated to a region.

@return: encodings.encoding[]|nil


select_encoding​

function core.doc.encodings.select_encoding(title_label: string, callback: fun(charset: string))

Open a commandview to select a charset and executes the given callback,

@param title_label: string — Title displayed on the commandview