-1

I downloaded tweets in Urdu language. When I read the csv file using pandas in python, the tweet is shown as follows:

Sample tweet text

Unicode code point I want to convert this into utf-8.

1 Answers1

-1

When you are writing the tweet data to a file use .decode('utf-8') And when you try to read data from that file use .encode('utf-8')

Here I am posting an example:

# -*- coding: utf-8 -*-
string1 = "آکاش کمار"
string2 = string1.decode('utf-8')
string3 = string2.encode('utf-8')
print(string3)
eiram_mahera
  • 950
  • 9
  • 25