method
encode!
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
v2_2_9 -
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)
![Default_avatar_30](https://www.gravatar.com/avatar/096fbde2c2ad4278847dfe5b51cc5276?size=30&default=http://apidock.com/images/default_avatar_30.png)
0 thanks
output GBK
‘I am 中国人’.encode(‘gbk’,‘utf-8’)