Java printwriter issues
Hi guys, my problem is literally in the title... Everytime I give my writer a String input, those weird questionmarks are added in front of the String which unables me to check for the given user in the database... (screenshot)
The code I am using: https://pastebin.com/hMaX63zy
Pastebin
a - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
25 Replies
⌛
This post has been reserved for your question.
Hey @netty.bootstrap! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
ohh
I didnt even know thats possible
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
okkk thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
to get the input for the users account and grab it from the db
And I did some debugging already, the error is literally here
or in this method you sent above
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
They appear for both strings
for this one also
if you put a println statement after the last line on this ss, the string is already messed up
so ig its a writer issue
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
ye whats wrong about socket streams?
The code I sent is listening on a server
you connect to via telnet
I just did some debugging on the backend to check why the login did not work
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
do you mean for example the username?
or what exactly do you mean
in the case of this, I just took the username string and passed it over to the parameter and constructor of my db handler
to then print it out and check where the issue is coming from
but like I said, it seems that the string itself is already messed up before anything is passed at all.
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
what socket
the serverSocket?
if yes, its already messed up before it enters yes
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
hm but thats not what I wanna do I think
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
okok I see ill try once on pc
What else do you need to see for example
what class for example
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.