\ x00在二进制文件中是什么意思? [英] What does \x00 mean in binary file?

查看:2256
本文介绍了\ x00在二进制文件中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问一个人"ASCII文件和二进制文件有什么区别?"

Once I asked a guy "what is the difference between ASCII and Binary files?"

他说二进制文件始终带有\ x00"

And he said "Binary files always have \x00"

我一直在搜索此内容,发现 PHP中\ x00,\ x04的含义

I've been searching about this and found What is the meaning of \x00 , \x04 in PHP

所以结论是,ASCII文件没有NULL字符吗?

so the conclusion is, ASCII files don't have NULL character?

推荐答案

一个ASCII文件可能被读取或解释为具有以NULL结尾的字符串,回车&旨在阅读和执行的换行符或其他控制字符.例如,文本阅读器可能会寻找一行文本,其中一行是在到达换行符之前看到多少个字符"

An ASCII file might be read or interpreted as having NULL-terminated strings, carriage returns & line-feeds, or other control characters, that are intended to be read and acted on. For example, a text reader might look for a line of text, where a line is "however many characters you see before you get to a linefeed"

二进制文件被认为只是一个字节序列-它们没有任何特殊含义,因为文本阅读器会解释它们.

A binary file is considered to be just a sequence of bytes - none of them has any special meaning, in the sens that a text-reader would interpret them.

\ x00是特定字节值(十六进制0)的示例,该值可能由文本阅读器以特殊方式解释.

\x00 is an example of a specific byte value (HEX 0), that might be interpreted in a special way by a text reader.

这篇关于\ x00在二进制文件中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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