3

I am new to DataNitro. I want to deal with some Chinese Characters in my excel sheet but fail.

When I print Chinese Characters in Python Shell, everything is right. However, when I print Chinese Characters in an imported python file, it tells me UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 36: illegal multibyte sequence.

I think codec should be utf-8 so I tried adding headers below. But this still doesn't work.

# -*- coding: utf-8 -*-

Hope some one could give me some tips. Thanks.

  • Which characters are you trying to print? – Ben Lerner Sep 16 '14 at 15:32
  • I am trying to `print("中文")` – user3847025 Sep 17 '14 at 14:36
  • Dear Ben, I tried but still can not solve this problem. I could print Chinese character(say, `print('中文')`) in the shell and outside of Datanitro. However, I couldn't print in Datanitro(say, import a file). This troubles me a lot and I can not move on. Could you help give me some hint, so I can go further. Thanks. – user3847025 Sep 28 '14 at 13:19

0 Answers0