These are chat archives for ipython/ipython

2nd
Jan 2016
stonebig
@stonebig
Jan 02 2016 17:27
is it normal to still have uncorrect characters when launching !dir on Jupyter Notebook (4.0.6) / ipython (4.0.1) on (French here) Windows 7 ? It is the same issue also for QtConsole (4.1.1)

!dir

Le volume dans le lecteur D s'appelle DATA
Le num‚ro de s‚rie du volume est 10BD-2ADB

R‚pertoire de D:\result_tests\winpython-3.4.4.0r.amd64\notebooks

02/01/2016 18:26 <REP> .
02/01/2016 18:26 <REP> ..
02/01/2016 18:26 <REP> .ipynb_checkpoints
26/12/2015 14:30 <REP> assets
26/12/2015 14:44 35ÿ646 Bokeh_Elements.ipynb

stonebig
@stonebig
Jan 02 2016 17:36

python-3.4.4

import os; import sys; import locale
print (sys.getdefaultencoding(), sys.getfilesystemencoding())
print( locale.getpreferredencoding(), sys.stdin.encoding, sys.stdout.encoding)

utf-8 mbcs
cp1252 cp1252 UTF-8

things are looking a better when converting to 'cp850' and printing:
a=!dir

c=[b.encode('cp1252').decode('cp850') for b in a]

print ('\n'.join(c))

Le volume dans le lecteur D s'appelle DATA
Le numéro de série du volume est 10BD-2ADB

Répertoire de D:\result_tests\winpython-3.4.4.0r.amd64\notebooks

02/01/2016 18:42 <REP> .
02/01/2016 18:42 <REP> ..
02/01/2016 18:26 <REP> .ipynb_checkpoints
26/12/2015 14:30 <REP> assets
26/12/2015 14:44 35 646 Bokeh_Elements.ipynb
26/12/2015 14:51 2 175 523 Composing_Data.ipynb
26/12/2015 14:49 120 189 Continuous_Coordinates.ipynb

stonebig
@stonebig
Jan 02 2016 18:02
ipython/ipython#9107
Andrew M. C. Dawes
@amcdawes
Jan 02 2016 22:09
This message was deleted