Advertising
LEO

It looks like you’re using an ad blocker.

Would you like to support LEO?

Disable your ad blocker for LEO or make a donation.

 
  •  
  • Forum home

    Language lab

    1 Kilobyte equals 1024 bytes - or does it?

    Topic

    1 Kilobyte equals 1024 bytes - or does it?

    Comment
    OK, LEO systems programmers. This is YOUR website, so you can impose house rules. "1 Kb per post", or your database is going to choke.
    But I just created a new thread ("jazz it up...."), and I know that my text was exactly 995 bytes long, including "topic", and my name at the end. I know that because I type my posts in MS Word before I paste them into the little "Comment" window.on LEO. And MS Word has a statistics function that counts words (indispensable for translators who get paid by the word), as well as characters.

    Last time I looked in my "Computer Basics" book, 1 Kilobyte was 1024 bytes. Are Kilobytes a little smaller at Technische Universität München? :-)

    P.S. Per MS Word statistics, this post has exactly 683 characters, including topic and my signature.
    AuthorHans Wolff <us>19 Aug 02, 07:21
    Comment
    Does Word also count CR/LF's? You typed quite a lot paragraphs and a few blank lines in your previous code, maybe they added up to the missing bytes before you reformatted the message into two.
    #1AuthorMarkus <de>19 Aug 02, 07:39
    Comment
    "previous post", that should read... lol .. too much source code documentation already for me today ....
    #2AuthorMarkus <de>19 Aug 02, 07:41
    Comment
    From forum.cgi:

    if(length($arg{$key}) > 1024) {

    So yes, it is 1024 bytes (even at TUM).

    Besides the above mentioned CR/LF-issue there's another thing the word statistics function can't know about: some characters have to be processed before the length check is done (i.e. '<' becomes '&gt;', double quote becomes two single quotes etc.).

    The stats of your post on our end are:
    Topic+Comment+Name+Email=42+800+21+0=863 bytes


    BTW: the 1k limit is applied to each item of a post (e.g. Comment, E-Mail etc.) individually, therefor a post can total more than 1k.
    #3AuthorA. Paul19 Aug 02, 10:12
    Comment
    So we can use 1k email addresses, can't we? That's nice :-).
    #4AuthorCyprinius19 Aug 02, 14:48
    Comment
    In theory, but only if your browser ignores the MAXLENGTH=80 setting of the Email input field.
    #5AuthorA. Paul19 Aug 02, 15:06
    Comment
    1KB = 1000Byte.
    1024Byte = 1KiB (KibiByte)

    See http://en.wikipedia.org/wiki/Binary_prefix#IE... for more information.
    #6AuthorJam17 Jul 07, 20:32
    Comment
    *schnüffel*

    *PUH*

    Lass den Faden doch in Frieden ruhen.
    #7AuthorSid2K718 Jul 07, 09:51
    Comment
    @Jam
    Thanks a lot. Didn't know anything about IEC 60027.
    #8AuthorB18 Jul 07, 10:48
     
  •  
  •  
  •  
  •  
  •  
  
 
 
 
 
  automatisch zu   umgewandelt