From: MikkelFJ Date: 2003-01-26T01:11:36+09:00 Subject: Re: Windows Text vs DOS Text "Chris Gehlker" wrote in message news:CDED74F4-3078-11D7-B7C6-000A27DA50C4@mac.com... > This doesn't really have much to do with Ruby. It just seemed to be a > question that the Ruby community would be uniquely qualified to answer. > > Yesterday I thought I knew what "text" meant. I though it was human > readable ASCII that followed any of three conventions for end-of-line. > So I felt perfectly comfortable telling someone to distribute a file as > "Windows/DOS text" to a group of people. I was confused when she asked > me "Well, which do you want, Windows or DOS?" So I looked at the I haven't really experimented with DOS files under Windows, but my guess is: DOS and Windows should be fairly identical as long as you are storing ASCII. However, if you use other characters such as a number of national characters in western europe, Windows uses the ANSI characterset while DOS uses whatever DOS codepage is active on the machine - which is different for each european country whereas most western european languages are covered by the same 8 bit ISO-Latin-1 characterset in Windows. Linebreaks are CR + LF in both case. Thus you should choose Windows over DOS for distribution. Mind you, Windows also uses multiple codepages - Greek is not covered by ISO-Latin-1 for instance, thus the problem has just moved. The best choice in general is UTF-8 since it is ASCII compatible and covers most of the worlds languages. The downside of UTF-8 is that many European Windows applications may expect files in ANSI and may not understand non-ASCII characters correctly. Notepad can always be used to open UTF-8 and store it in a different format. Mikkel