Instantly share code, notes, and snippets.

Embed
What would you like to do?
> perl -E 'say "生" & "死"'
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011
@noodles-v6

This comment has been minimized.

noodles-v6 commented Mar 27, 2012

I got 衫

@semuel

This comment has been minimized.

semuel commented Mar 29, 2012

noodles-v6: here is a list of encodings that will give you this results:
(the binary representation if in order of qw{生 死 衫})
So your command line is probably assuming on of these.

found for encoding cp936: 1100100111111010, 1100101111000000, 1100100111000000
found for encoding euc-cn: 1100100111111010, 1100101111000000, 1100100111000000
found for encoding gb12345-raw: 0100100101111010, 0100101101000000, 0100100101000000
found for encoding gb2312-raw: 0100100101111010, 0100101101000000, 0100100101000000
found for encoding hz: 011111100111101101001001011110100111111001111101, 011111100111101101001011010000000111111001111101, 011111100111101101001001010000000111111001111101
found for encoding iso-ir-165: 0100100101111010, 0100101101000000, 0100100101000000
found for encoding MacChineseSimp: 1100100111111010, 1100101111000000, 1100100111000000

@noodles-v6

This comment has been minimized.

noodles-v6 commented Mar 29, 2012

@semuel
I understand it. is there a tool for encoding and decoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment