anchor.diff:          ?assertEqual(<<"-3.14">>, io_to_db(Item,OldString,binstr,5,Prec,Def,RW,<<"-3.14">>)),
           ?Info("io_to_db success 4b~n", []),
   
  -        ?assertEqual(<<"OldäString">>, io_to_db(Item,<<"OldäString">>,binstr,11,Prec,Def,RW,<<"OldäString">>)),
  -        ?assertException(throw,{ClEr,{"String is too long",{0,{<<"OldäString">>,3}}}},  io_to_db(Item,<<"OldäString">>,binstr,Len,Prec,Def,RW,<<"OldäString">>)),
  -        ?assertException(throw,{ClEr,{"String is too long",{0,{<<"NewVal">>,3}}}}, io_to_db(Item,<<"OldäString">>,binstr,Len,Prec,Def,RW,<<"NewVal">>)),
  +        ?assertEqual(<<"OldäString"/utf8>>, io_to_db(Item,<<"OldäString"/utf8>>,binstr,11,Prec,Def,RW,<<"OldäString"/utf8>>)),
  +        ?assertException(throw,{ClEr,{"String is too long",{0,{<<"OldäString"/utf8>>,3}}}},  io_to_db(Item,<<"OldäString"/utf8>>,binstr,Len,Prec,Def,RW,<<"OldäString"/utf8>>)),
  +        ?assertException(throw,{ClEr,{"String is too long",{0,{<<"NewVal">>,3}}}}, io_to_db(Item,<<"OldäString"/utf8>>,binstr,Len,Prec,Def,RW,<<"NewVal">>)),
           ?assertEqual(<<"NewVal">>, io_to_db(Item,OldString,binstr,6,Prec,Def,RW,<<"NewVal">>)),
           ?assertEqual(<<"[NewVal]">>, io_to_db(Item,OldString,binstr,8,Prec,Def,RW,<<"[NewVal]">>)),
           ?assertEqual(default, io_to_db(Item,OldString,binstr,Len,Prec,Def,RW,<<"default">>)),
  
positive.code:         %% ?assertEqual(<<"<<\"ddäöü\">>/utf8">>, item(2,{'Imem',<<"ddäöü"/utf8>>})),
          ?Info("item success~n", []),
  
          ?assertEqual(<<"123">>, decimal_to_io(123,0)),
          ?assertEqual(<<"-123">>, decimal_to_io(-123,0)),
          ?assertEqual(<<"12.3">>, decimal_to_io(123,1)),
  
negative.code:     end;
  t2s(T) -> io_lib:format("~p", [T]).
  
  
  escape_io(Str) when is_list(Str) ->
      re:replace(Str, "(\022)", "\\\022", [global, {return, list}]);   
  escape_io(Bin) when is_binary(Bin) ->
      re:replace(Bin, "(\022)", "\\\022", [global, {return, binary}]). 
  
  string_to_io(Val) when is_list(Val) ->
      case io_lib:printable_unicode_list(Val) of
          true ->    %% list_to_binary(io_lib:format("\"~ts\"",[Val]));
              unicode:characters_to_binary([$" | escape_io(Val) ++ [$"]]);
          false ->
              list_to_binary(lists:flatten(io_lib:format("\"~tp\"",[Val])))
      end;                                    
  string_to_io(Val) ->
      list_to_binary(lists:flatten(io_lib:format("~tp",[Val]))).      %% "\"~tp\""
  
  integer_to_io(Val) ->
      list_to_binary(integer_to_list(Val)).
  