How to display binary data as text in table?

Discussion in 'HTML' started by brett, Dec 23, 2003.

  1. brett

    brett Guest

    Hi,

    I have encrypted text that id like to display in a table. The problem is
    that since it contains every character youve ever imagined, it doesnt
    format nicely. When put in a table the characters display in one line
    until a whitespace appears (which is entirely at random). Is there any way
    i can get a table to split up a word and wrap it on the next line? Im sure
    the table is considering my endless stream of random characters as a
    single word until some whitespace occurs at which point it will start a
    new line.

    Thanks,
    brett
    brett, Dec 23, 2003
    #1
    1. Advertising

  2. brett wrote:
    > I have encrypted text that id like to display in a table. The problem is
    > that since it contains every character youve ever imagined, it doesnt
    > format nicely. When put in a table the characters display in one line
    > until a whitespace appears (which is entirely at random). Is there any way
    > i can get a table to split up a word and wrap it on the next line? Im sure
    > the table is considering my endless stream of random characters as a
    > single word until some whitespace occurs at which point it will start a
    > new line.


    Use a script to insert spaces every n characters. Why do you need to
    display binary data to start with?
    Leif K-Brooks, Dec 23, 2003
    #2
    1. Advertising

  3. brett

    Cameron Guest

    brett wrote:
    <snip>


    > Im sure the table is considering my endless stream of random characters as a
    > single word until some whitespace occurs at which point it will start a
    > new line.
    >
    > Thanks,
    > brett
    >


    yeah, that's how word wrapping usually works, either that or a hyphen is
    inserted, because as far as it knows your endless stream of characters
    is a word.

    ~Cameron
    Cameron, Dec 23, 2003
    #3
  4. brett <> wrote:

    > I have encrypted text that id like to display in a table.


    I'd like to know why, but maybe you're just illustrating what encrypted
    text might look like.

    > The
    > problem is that since it contains every character youve ever
    > imagined,


    I don't think it does. Does it contain the Yucca symbol, or even all
    the current and proposed Unicode characters?

    > it doesnt format nicely.


    Not surprising. By the way, does it contain control characters (control
    codes) too?

    > When put in a table the
    > characters display in one line until a whitespace appears (which is
    > entirely at random).


    It is very difficult to create truly random phenomena, but let's take
    the word loosely. So there might be a trillion 'x' letters in
    succession.

    > Is there any way i can get a table to split up
    > a word and wrap it on the next line?


    The simple way is to insert a space after every n characters. Then
    again, how would the user know what the encrypted string really is?
    Maybe it's better to put the data inside <pre> (note that you may wish
    to say pre { margin: 0; } in CSS to prevent extra spacing) and generate
    a line break after every n characters, and naturally explain this on
    the page.

    > Im sure the table is
    > considering my endless stream of random characters as a single word
    > until some whitespace occurs at which point it will start a new
    > line.


    The table, as all of HTML, is just data. Data doesn't do things, except
    in Star Trek. Browsers generate break at whitespace only, but there are
    many variations of the theme, see
    http://www.cs.tut.fi/~jkorpela/html/nobr.html

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Dec 24, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VHJpbGxpdW0=?=

    Multiple data-table display in data control

    =?Utf-8?B?VHJpbGxpdW0=?=, Apr 20, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    732
    =?Utf-8?B?VHJpbGxpdW0=?=
    Apr 21, 2005
  2. Rio
    Replies:
    4
    Views:
    1,174
  3. Marek Kurowski
    Replies:
    1
    Views:
    980
    Mark A. Odell
    Aug 18, 2004
  4. =?Utf-8?B?c2NvdHRybQ==?=

    retrieve binary data from database and display in browser

    =?Utf-8?B?c2NvdHRybQ==?=, Mar 23, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    698
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Mar 23, 2007
  5. Display Image Binary data in Web Browser

    , Jul 11, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    301
    Pete Wood
    Jul 15, 2005
Loading...

Share This Page