0

I am using Slack API /channels.history to get messages of channel. My messages have Japanese characters. Api response is always encoded for Japanese characters as below:

Original message in Slack web interface:

me: ใƒ†ใ‚นใƒˆ

But It returns response:

{...
'text': '\u30c6\u30b9\u30c8',
}

I don't know which encoding method is used here. Then, how can I get Japanese characters back from Api response.

Rohanil
  • 1,717
  • 5
  • 22
  • 47

1 Answers1

0

This is a unicode notation from Java. \u stands for unicode, probably UTF-8. the 4 bytes in hex notation define the character.

To convert it back check for methods in your programming language to handle UTF-8 encoding.

Also see this question for info on how to handle this encoding in Java.

Community
  • 1
  • 1
Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114