Here is a live example of what I am talking about: http://185.112.249.77:9999/Api/search?search=ж
That URL displays no results.
http://188.226.217.48:8338/api/clan_search/ж
It does display results.
How come this is happening?
My code for reading the parameter is: String search = request.getParameter("search");
System.out.println(search);
also outputs a
?
I looked around and it seems there might be something I need to do in the Tomcat8 Config but I can't find what or figure out what has to be done.
I'd appreciate any help with this.
This problem also occurs when I am printing out the results. The first one shows no results and the 2nd shows the results and in UTF-8.
What is the most likely issue causing this and what code/config files would you need to see?
EDIT
I am receiving a bytearray
which I am converting to an inputstream
via a bytearrayinputstream
like this.
InputStream myis = new ByteArrayInputStream(decryptedPayload);
I have a class which handles the packet and it extends a class I made called PacketInputStream
. This class has a readString function which goes like this:
public String readString() throws IOException {
int length = readVarInt();
byte[] data = new byte[length];
readFully(data);
return new String(data, UTF8);
}
The string doesn't display properly on the returned byte[]s and it also doesn't work when I send it through a GET parameter.
Thanks