Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many Character in 1 MB .txt file? [duplicate]

I'm developing an Android app, and it use Intent String, from an information that I've been read Intent putExtra can only tranfer String with max size 1 MB, I wondering how much String that I can put in it, because I want to put JSON and consider the length.

like image 941
Roberto Capah Avatar asked Feb 09 '18 04:02

Roberto Capah


People also ask

How many characters is a 1mb text file?

Megabyte (MB) A megabyte is 1,048,576 bytes or 1,024 kilobytes. 873 pages of plain text (1,200 characters).

How big is a character in a text file?

You will find that the file has a size of 30 bytes on disk: 1 byte for each character.

How many characters is a 1gb text file?

Text ASCII File An ASCII character in 8-bit ASCII encoding is 1 byte; so, we get 107,3741,824 characters. Assume an average of 5 characters per word, plus a space (6 characters) = 178,956,970 words.


1 Answers

Well, single character takes exactly 8 bits to be stored in, that's 1 byte (B). So 1 MB = 1024KB and 1 KB = 1024B so 1 MB has 1024 x 1024 = 1,048,576 bytes, that's 1,048,576 characters, that includes everything

like image 113
duggu Avatar answered Sep 29 '22 19:09

duggu