utf16_to_utf8

On this page
  1. wakterm.utf16_to_utf8(str)

wakterm.utf16_to_utf8(str)#

This function is overly specific and exists primarily to workaround this wsl.exe issue.

It takes as input a string and attempts to convert it from utf16 to utf8.

local wakterm = require 'wakterm'

local success, wsl_list, wsl_err =
  wakterm.run_child_process { 'wsl.exe', '-l' }
wsl_list = wakterm.utf16_to_utf8(wsl_list)
Edit this page