问题
By default, the JSON notebooks' encoding is ASCII:
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"2.1.4. Nombre d'\u00e9l\u00e9ments: call/function/len"
]
},
Is it possible to change that into UTF-8?
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"2.1.4. Nombre d'éléments: call/function/len"
]
},
I thought the option would be here, but I cannot figure out which one would make the trick.
回答1:
No it's not possible. You are mistaking the file encoding and the JSON encoding.
If you actually look at the file encoding you will see that it is UTF-8 (in vim):
{ "cells": [ { "cell_type": "markdown", "metadata": { "internals": { encoding? encoding=utf-8
[update] On current developpement version of IPython (future 3.0) the function responsible to write the file on disk now try to write it as UTF-8, so this should be fixed. Cf PR 7144. There is no way to configure back to plain ASCII though.
来源:https://stackoverflow.com/questions/27186073/change-ipython-notebook-json-file-encoding