toUtf8

Convert text in an arbitrary (known) encoding to UTF-8.

  1. string toUtf8(ascii data, string cp, bool force)
    string
    toUtf8
    (
    in ascii data
    ,
    string cp
    ,
    bool force = false
    )
  2. string toUtf8(ubyte[] data, string cp, bool force)

Parameters

data ascii

text to convert

cp string

the name of the source character encoding

force bool

do not throw on errors; instead, do a best-effort translation

Meta