Advertisement
ExaGridDba

view any character set with only PuTTY and sqlplus

Feb 11th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. $ unset NLS_LANG
  2. $ cat elementary.sql
  3.  
  4. select unistr('\201c') || 'Elementary,' || unistr('\201d') || ' said he.' q from dual;
  5.  
  6. quit
  7. $ sqlplus win/win @ elementary.sql
  8.  
  9. Q
  10. ----------------------
  11. ?Elementary,? said he.
  12.  
  13. $ export NLS_LANG=.US7ASCII
  14. $ sqlplus win/win @ elementary.sql
  15.  
  16. Q
  17. ----------------------
  18. ?Elementary,? said he.
  19.  
  20. $ export NLS_LANG=.WE8MSWIN1252
  21. $ sqlplus win/win @ elementary.sql
  22.  
  23. Q
  24. ----------------------
  25. Elementary, said he.
  26.  
  27. PuTTY Window->Translation->Win1251(Western).
  28. Open new window.
  29.  
  30. $ export NLS_LANG=.WE8MSWIN1252
  31. $ sqlplus win/win @ elementary.sql
  32.  
  33. Q
  34. ----------------------
  35. “Elementary,” said he.
  36.  
  37. $ export NLS_LANG=.AL32UTF8
  38. $ sqlplus win/win @ elementary.sql
  39.  
  40. Q
  41. --------------------------------------------------------------------------------
  42. “Elementary,â€
  43.  
  44. PuTTY Window->Translation->UTF-8.
  45. Open new window.
  46.  
  47. $ export NLS_LANG=.AL32UTF8
  48. $ sqlplus win/win @ elementary.sql
  49.  
  50. Q
  51. --------------------------------------------------------------------------------
  52. “Elementary,” said he.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement