How to display binary data as text in table?

B

brett

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
 
L

Leif K-Brooks

brett said:
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?
 
C

Cameron

brett wrote:
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
 
J

Jukka K. Korpela

brett said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top