SHARE
TWEET

Untitled

a guest Feb 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top