Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fid = fopen('temp.txt', 'w');
- str = char([1576, 1580, 1604, 1740, 10]);
- encoded_str = unicode2native(str, 'UTF-8');
- fwrite(fid, encoded_str, 'uint8');
- fclose(fid);
- perl -E "open my $fh, q{<:utf8}, q{temp.txt}; while (<$fh>) {while (m/(.)/g) {say ord $1}}"
- 1576
- 1580
- 1604
- 1740
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement