I was processing some data tweeter using java. I read them from the file, do some process and print to the stdout
.
The text in file looks like this:
"RT @Bollogosta319a: #BuyBookSilentSinners \u262fGain Followers\n\u262fRT This\n\u262fMUST FOLLOW ME I FOLLOW BACK\n\u262fFollow everyone who rts\n\u262fGain\n #ANDROID \u2026"
I read it in, and print it out to stdout. The output is supposed to be:
"RT @Bollogosta319a: #BuyBookSilentSinners ☯Gain Followers\n☯RT This\n☯MUST FOLLOW ME I FOLLOW BACK\n☯Follow everyone who rts\n☯Gain\n #ANDROID …"
But my output is like this:
"RT @Bollogosta319a: #BuyBookSilentSinners ?Gain Followers ?RT This ?MUST FOLLOW ME I FOLLOW BACK ?Follow everyone who rts ?Gain #ANDROID ?"
So, it seems that I have two problems to deal with:
1. print the exact Unicode character
instead of Unicode string
2. keep "\n"
as it is, instead of a newline in the output.
How can I do this? (I'm really crazy about dealing with different coding in Java)