Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

encoding problem with client-server program  RSS feed

 
Arad Chear
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have implement client server program
client ask the server to download file
then the server send that file to the client if it exist

i create file in the server project/folder and type data on it
i can see data appear correctly on the Text editor
but when the data sent to the client its apear many ununderstandable characters followd by my original data

something like this :

paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\fs24 \cf0 Hi\
iam on the server}
null
TCP connection closed ,,
Bye , Bye ..

I used BufferedReader and PrintWriter in both sides client & server

i am using Mac Leopard 10.5 with TextEdit progtam

any suggestions ?
 
Prakash Subramanian
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the format in which you have saved the file in your editor.
Hope your server code is not doing anything wrong with the encoding of the characters to be sent.
Can see some escape sequences for tab and unicode, so maybe you can post a cleaned up code snippet.
 
Arad Chear
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

i have solved the issue
and as you say it was Saving encoding problems

i just save it as UTF-8 and its work ..

Thanks ,,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!