Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Character Encoding - mahine independent  RSS feed

 
John J Smith
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. This is my first post here, so here it goes:
I was just wondering if anybody could offer me any suggestions on this (I know I can do it using streams... just don't know exactly how).
I am writing a small File Transfer client (TFTP). In a netascii transfer, the data consists of lines of ASCII text followed by a carriage return and a linefeed (CR/LF). The client that I am writing is responsible for converting between netascii format and the format used by the machine that I am running the client on.
I know Unix will support this CR/LF, but I think a Windows based machine just uses Line Feeds. Any suggestions? Thanks alot! I like the site!
 
Jim Baiter
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this doc:
http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc
It has worked well for me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!