Working w/ Japanese

0 Jonathan Plyler · May 11, 2015
Hello!

I am new to python and am creating a program to translate Japanese scripts into English.  However, I have run into a problem.  I am reading in a text file, but when I print it in the command line, it comes out in jibberish (coded, I think).  Here is my code:

fob = open('/Users/Jonathan/Documents/Episode_1 copy.txt','r')
listme = fob.readlines()
print listme

I would like to edit the file by parsing it (there is more than just the Japanese text in the file) and then use google to translate.  Right now I am just looking at how to get the Japanese text to show up in the correct format (Japanese) when I read it in using Python.  I read somewhere about the codecs module, but couldn't figure out how to get it, or if it would solve the problem.  Can anyone help?  Thanks!

Jonathan.


Post a Reply

Replies

Oldest  Newest  Rating
0 c student · May 11, 2015
are you reading in the japanese characters as ascii?
  • 1

Python

107,117 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator