Empty notepad text file has greater size than 0 bytes (3 bytes)
|Why does empty text file created in Windows Notepad have file size greater than 0 bytes ? My one does not contain any text content, but it has 3 bytes.|
|First, please note there are multiple types of file sizes available in Windows. When you click on the file with the right mouse button and choose Properties, you can see Size and Size on disk. These file sizes are usually different, because there are different calculation methods used.|
Size is the actual size of the file in bytes.
Size on disk is the indicator of how much space does a file occupies on the disk drive.
When creating a Notepad text file, the file size depends also on used character encoding. You can choose which encoding to use when saving the file, at the bottom part of the window. There should be available at least ANSI and UTF-8 encoding. Depending on Windows version there can be also Unicode or UTF-16.
If you save an empty Notepad text file using ANSI encoding, its file size should be 0 bytes. When you use UTF-8 or UTF-16 encoding, the file size should be greater. It should be 2 - 3 bytes.
The reason why empty file can have the file size greater than 0 bytes is, that each encoding is using a different method to store a content. It means there can be added some content that you can't read or modify, like end-of-line characters, line breaks or other file related information.
When you change the character encoding, it should have impact on the file content, for example some characters may be not displayed correctly.
|How to calculate inverse currency exchange rate ?|
|How to add side by side rows in excel pivot table ?|
|Remove or hide bottom navigation bar with buttons on Android|
|How to change QWERTZ keyboard to QWERTY in Windows 10 ?|
|Incorrect integer value '' for column 'user_id' at row 1 - error|
|How to calculate how many Man Days are 3 Man Hours ?|
|Check if value exists in column more than once or twice - Excel|