anchor.diff:                     [f("    default: relem[i] = aa_undefined;\n")] ++
                      [f("}\n")];
              string ->
  -               %% FIXME: utf-8 unpack!!
  -               [f("relem[i] = enif_make_string_len(\n"),
  -                f("               env,\n"),
  -                f("               ~s->~s(i).data(),\n",[MsgVar, LCFName]),
  -                f("               ~s->~s(i).size(),\n",[MsgVar, LCFName]),
  -                f("               ERL_NIF_LATIN1);\n")];
  +               [f("{\n"),
  +                f("    const char    *sData = ~s->~s(i).data();\n",
  +                  [    MsgVar, LCFName]),
  +                f("    unsigned int   sSize = ~s->~s(i).size();\n",
  +                  [    MsgVar, LCFName]),
  +                f("    relem[i] = utf8_to_erl_string(env, sData, sSize);\n"),
  +                f("}\n")];
              bytes ->
                  [f("{\n"),
                   f("    unsigned char *data;\n"),
  
positive.code: 
  format_nif_cc_includes(Mod, Defs, _Opts) ->
      IsLiteRT = is_lite_rt(Defs),
      %% FIXME:
      ["#include <string.h>\n",
       "#include <string>\n",
       "\n",
  
negative.code: 
  %% -- nif c++ code -----------------------------------------------------
  
  format_nif_cc(Mod, Defs, Opts, AnRes) ->
      [format_nif_cc_includes(Mod, Defs, Opts),
       format_nif_cc_local_function_decls(Mod, Defs, Opts),
       format_nif_cc_mk_atoms(Mod, Defs, Opts),
       format_nif_cc_utf8_conversion(Mod, Defs, AnRes, Opts),
       format_nif_cc_decoders(Mod, Defs, Opts),
       format_nif_cc_unpackers(Mod, Defs, Opts),
       format_nif_cc_foot(Mod, Defs, Opts)].
  