Article View: comp.lang.java.api
Article #12Re: Strange I/O behavior
From: MWRon
Date: Fri, 08 Dec 2000 14:42
Date: Fri, 08 Dec 2000 14:42
33 lines
2312 bytes
2312 bytes
In article <3A303861.F2CF902C@optonline.net>, ronw@optonline.net wrote: >Wait a minute... waiting ....... :) >MWRon wrote: > >> >> It is because Macs use a different line ending than UNIX does. the 0xA >> and 0xD are turned around. >> > >I thought that Macs use 0x0d line termination, UNIX uses 0x0a line termination, >and DOS uses 0x0d 0x0a line termination, so any code that works under all >platforms has to hunt for both CR and LF. Many programs have been burned by >that, including Netscape, early PC versions of which couldn't read the the >bookmark file created on the Mac version until the LFs had been added. but.... if unix has 0xA and Windows has 0xD/0xA if you searched for 0xA while you would always get an extra "CR' in the Windows code it would parse the line correctly. I assumed that Java just ignores 'CR'. However since Macs have no 0xA they never get an end of line. Ron -- CodeWarrior PersonalJava Edtion The speed, integration, and flexibility of the product are truly impressive. Java Report Online http://www.javareport.com/html/from_pages/product_review.cfm?articleID=1616 Metrowerks "Software Starts Here" MWRon@metrowerks.com
Technical Details
Message-ID:
<mwron-0812000942350001@c243286-a.bcreek1.mi.home.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!216.65.3.50.MISMATCH!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!cyclone-sf.pbi.net!165.113.238.17!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwronReferences:
<mtobin-99A222.22175206122000@news.earthlink.net> <mwron-0712001211280001@c243286-a.bcreek1.mi.home.com> <3A303861.F2CF902C@optonline.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,139b3b33219ebf5 X-Google-Attributes: gid10bcce,public X-Google-Thread: f635e,139b3b33219ebf5 X-Google-Attributes: gidf635e,public X-Google-Thread: fecd1,139b3b33219ebf5 X-Google-Attributes: gidfecd1,public X-Google-ArrivalTime: 2000-12-08 07:21:57 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!216.65.3.50.MISMATCH!feed-out.newsfeeds.com!newsfeeds.com!feed.newsfeeds.com!newsfeeds.com!cyclone-sf.pbi.net!165.113.238.17!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron From: mwron@metrowerks.com (MWRon) Newsgroups: comp.lang.java.api,comp.sys.mac.programmer.codewarrior,codewarrior.mac Subject: Re: Strange I/O behavior Date: Fri, 08 Dec 2000 09:42:35 -0500 Organization: Metrowerks Lines: 33 Message-ID: <mwron-0812000942350001@c243286-a.bcreek1.mi.home.com> References: <mtobin-99A222.22175206122000@news.earthlink.net> <mwron-0712001211280001@c243286-a.bcreek1.mi.home.com> <3A303861.F2CF902C@optonline.net> NNTP-Posting-Host: p-799.newsdawg.com X-Newsreader: MT-NewsWatcher 2.4.4