method
encode!
v1_9_3_392 -
Show latest stable
-
1 note -
Class: String
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
encode!(*args)
public
The first form transcodes the contents of str from str.encoding to encoding. The second form transcodes the contents of str from src_encoding to dst_encoding. The options Hash gives details for conversion. See String#encode for details. Returns the string even if no changes were made.
Register or
log in
to add new notes.
azhao -
April 2, 2013 - (v1_9_3_392)
0 thanks
output GBK
‘I am 中国人’.encode(‘gbk’,‘utf-8’)