Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. fid = fopen('temp.txt', 'w');
  2.  
  3. str = char([1576, 1580, 1604, 1740, 10]);
  4.  
  5. encoded_str = unicode2native(str, 'UTF-8');
  6. fwrite(fid, encoded_str, 'uint8');
  7.  
  8. fclose(fid);
  9.  
  10. perl -E "open my $fh, q{<:utf8}, q{temp.txt}; while (<$fh>) {while (m/(.)/g) {say ord $1}}"
  11. 1576
  12. 1580
  13. 1604
  14. 1740
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement