Wednesday, May 13, 2015

Re: How to ensure 1 byte per character

<Meino.Cramer <at> gmx.de> writes:
>Paul <Paul.Domaskis <at> gmail.com> [15-05-01 03:46]:
>> This is my first foray into character encoding, and I'm trying to
>> ensure that a large file is of the size that one can expect for 1
>> byte per character. It is a simple text file that contains about
>> 42 million characters. The file on the HD is 84MB. I've set
>> encoding and fileencoding to latin1, which the help says is 8-bit
>> characters. I also have fileformat=unix to ensure that line
>> endings are only 1 byte. After writing to HD, however, the file on
>> the HD is still 84MB. I know that it's not due to my use of cygwin
>> because for this very text that I'm using to compose this message,
>> the characters counts so match the file size.
>>
>> What else could be cause the 2x discrepancy between file size and
>> characte count?
>
> what operating system do you use and from what tool/source is the
> information about the length of the file?

Sorry for the tardy reply. It's cygwin that I'm using, and I use the
"ls -l" command. The file size agrees nominally with Windows Explorer
(Windows 7).

The file size was accurate, but I found the cause for the greater file
size. There were some abnormal lines of text buried in the many, many
normal lines. Thanks anyway!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: