Getting 🔴 instead of actual emoji

I am using java and am making an api call to get followed streams. The response I get contains 🔴 instead of :red_circle:.

I am using an input stream to read in the call and a buffered stream to format it, but I can’t seem to find any reason I am getting the symbols instead of the circle.

This is the call
ArrayList channels = new ArrayList();
ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command(new String[]{“curl”, “-H”, “Accept: application/vnd.twitchtv.v5+json”, “\”, “-H”, "Client-ID: " + ClientID, “\”, “-H”, "Authorization: " + OAuth, “-X”, “GET”, “https://api.twitch.tv/kraken/streams/followed?limit=100”});
Process process = processBuilder.start();
InputStream inputStream = process.getInputStream();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonParser jp = new JsonParser();
JsonElement je = jp.parse(getStringFromInputStream(inputStream));
process.exitValue();

and this is the formatter
BufferedReader br = null;
StringBuilder sb = new StringBuilder();

	String line;
	try {

		br = new BufferedReader(new InputStreamReader(is));
		while ((line = br.readLine()) != null) {
			sb.append(line);
		}

	} catch (IOException e) {
		e.printStackTrace();
	} finally {
		if (br != null) {
			try {
				br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	return sb.toString();

Sounds like you are not accepting UTF-8 correctly?

That seemed to be issue. Forgot to put that I found the solution on here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.