• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

encoding problem with client-server program

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ,,
 
I don't like that guy. The tiny ad agrees with me.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic