Skip to content

Instantly share code, notes, and snippets.

@dialektike
Last active July 21, 2017 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dialektike/f2954c91efbb72ed00a94987022fdec5 to your computer and use it in GitHub Desktop.
Save dialektike/f2954c91efbb72ed00a94987022fdec5 to your computer and use it in GitHub Desktop.
유니코드 보기
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def unicode_test(value):\n",
" import unicodedata\n",
" name = unicodedata.name(value)\n",
" value2 = unicodedata.lookup(name)\n",
" print('value=\"%s\", name=\"%s\", value2=\"%s\"' % (value, name, value2))"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"value=\"☃\", name=\"SNOWMAN\", value2=\"☃\"\n"
]
}
],
"source": [
"unicode_test('\\u2603')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment