所有操作系统的通用换行符是什么? (LF和CR) [英] What is the universal newline for all operating systems? (LF and CR)

查看:202
本文介绍了所有操作系统的通用换行符是什么? (LF和CR)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Delphi编写文件时,它在Windows机器上,文件文件在Windows上工作正常。当我在Mac上使用它,但是期望格式化有所不同。在Mac上,换行符是不同的,它不能总是读取Windows文件。

When I write a file using Delphi it's on a Windows machine and the text files it puts out work fine on windows. When I use it on a Mac though it's expecting the formatting to be a bit different. On Mac the newline is different and it can't always read the Windows files.

如何使我的文件可以由mac程序读取?

How can I make my files readable by mac programs?

推荐答案


  • 对于Windows,它是CRLF

  • 对于UNIX, li>
  • 对于MAC(直到版本9),它是CR

  • 对于MAC OS X,它是LF

  • 简单的事实是,它对于所有操作系统是不同的。没有通用的换行符。你可以做的最好的事情就是意识到差异。

    The simple fact is that it is different for all operating systems. There is no "universal" newline. The best you can do is be aware of the differences.

    这篇关于所有操作系统的通用换行符是什么? (LF和CR)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆