d - how to decode ubyte[] to a specified encoding? -


the problem is: how parse file when encoding set @ runtime?

encoding be: utf-8, utf-16, latin1 or other

the goal convert ubyte[] string selected encoding. because when use std.stdio.file.bychunk or std.mmfile.mmfile have ubyte[] data.

are trying convert text file utf-8? if answer 'yes', phobos have function specialy this: @trusted string toutf8(in char[] s). see http://dlang.org/phobos/std_utf.html details.

sorry if not need.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -