| 전 | [2018-12-21] "���� Ŭ������ PLSI 1G Lightpath [to ���� Ŭ������ |
| 후 | [2018-12-21] "대전 클러스터 PLSI 1G Lightpath [to 광주 클러스터 |
$ python2
Python 2.7.16 (default, Apr 17 2020, 18:29:03)
>>> import codecs
>>> import binascii
>>> s1='0x5b323031382d31322d32315d2022b4ebc0fc20c5acb7afbdbac5cd20504c5349203147204c6967687470617468205b746f20b1a4c1d620c5acb7afbdbac5cd'
>>> s1
'0x5b323031382d31322d32315d2022b4ebc0fc20c5acb7afbdbac5cd20504c5349203147204c6967687470617468205b746f20b1a4c1d620c5acb7afbdbac5cd'
>>> type(s1)
<type 'str'>
>>> s2=binascii.a2b_hex(s1[2:])
>>> s2
'[2018-12-21] "\xb4\xeb\xc0\xfc \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd PLSI 1G Lightpath [to \xb1\xa4\xc1\xd6 \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd'
>>> type(s2)
<type 'str'>
>>> print(s2)
[2018-12-21] "���� Ŭ������ PLSI 1G Lightpath [to ���� Ŭ������
>>> s3=s2.decode('euc-kr')
>>> s3
u'[2018-12-21] "\ub300\uc804 \ud074\ub7ec\uc2a4\ud130 PLSI 1G Lightpath [to \uad11\uc8fc \ud074\ub7ec\uc2a4\ud130'
>>> type(s3)
<type 'unicode'>
>>> print(s3)
[2018-12-21] "대전 클러스터 PLSI 1G Lightpath [to 광주 클러스터
$ python3
Python 3.8.4 (default, Jul 14 2020, 02:58:48)
>>> import codecs
>>> import binascii
>>> s1='0x5b323031382d31322d32315d2022b4ebc0fc20c5acb7afbdbac5cd20504c5349203147204c6967687470617468205b746f20b1a4c1d620c5acb7afbdbac5cd'
>>> s1
'0x5b323031382d31322d32315d2022b4ebc0fc20c5acb7afbdbac5cd20504c5349203147204c6967687470617468205b746f20b1a4c1d620c5acb7afbdbac5cd'
>>> type(s1)
<class 'str'>
>>> s2=binascii.a2b_hex(s1[2:])
>>> s2
b'[2018-12-21] "\xb4\xeb\xc0\xfc \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd PLSI 1G Lightpath [to \xb1\xa4\xc1\xd6 \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd'
>>> type(s2)
<class 'bytes'>
>>> print(s2)
b'[2018-12-21] "\xb4\xeb\xc0\xfc \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd PLSI 1G Lightpath [to \xb1\xa4\xc1\xd6 \xc5\xac\xb7\xaf\xbd\xba\xc5\xcd'
>>> s3=s2.decode('euc-kr')
>>> s3
'[2018-12-21] "대전 클러스터 PLSI 1G Lightpath [to 광주 클러스터'
>>> type(s3)
<class 'str'>
>>> print(s3)
[2018-12-21] "대전 클러스터 PLSI 1G Lightpath [to 광주 클러스터