Can't print the correct character in console
Hey people, it's odd. But, when I write a message with special characters like á or Â, it doesn't print on my console well. Like, I know it is possible to print them because I did a test on the same program just creating a string with special characters and printing it. But, I can't do it when I try printing the message received by messageProtocolEntity.getBody(), am I getting the encoding wrong or something?
Example of piece of program running below:
Implicit declaration of parallel layers in a tuple is deprecated, pass a YowParallelLayer instead i printed this on console: áàéèúùâêóÂÊÔÛ (<- this proves it can print special chars on console) Message received: Dis dodo dis si olá (<- it should be saying "Dis dodo dis si olá")
what am I doing wrong?
Thanks,
Lucas Meyer.
For Python 3.0+: messageProtocolEntity.getBody().encode('latin-1').decode()