[0xff5e].pack("U").encode("EUC-JP", "UTF-8")

U+FF5E e$B$re(B EUC-JP e$B$KJQ49$G$-$J$$$N$O$=$&$$$&$b$N$G$7$g$&$+!#e(B

% ./ruby -ve ‘p [0xff5e].pack(“U”).encode(“EUC-JP”, “UTF-8”)’
ruby 1.9.0 (2008-08-01 revision 18312) [i686-linux]
-e:1:in encode': invalid byte sequence (RuntimeError) from -e:1:in

EUC-JP e$B$Ne(B \xA1\xC1 e$B$re(B UTF-8 e$B$KJQ49$9$k$He(B U+FF5E
e$B$K$J$k$N$G$9e(B
e$B$,!#e(B

% ./ruby -e ‘p “\xA1\xC1”.encode(“UTF-8”,
“EUC-JP”).unpack(“U”)[0].to_s(16)’
“ff5e”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs