Text not wrapping

I don't understand why the text is not wrapping on the following page:

http://www.blueapplehouses.com/wrap_problem.html
hrolsonsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HainKurtSr. System AnalystCommented:
try this

you have some strange characters between words, it is not space but A0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<BODY>
<table border=1 width=300>
<tr><td>
there is a check that came in for $xxx.xx from xxx xxx. It doesn`t reference your xxx house, but I`m assuming its from there. The stub on the check references a washing machine, and in red it says:
</td></tr></table>	
</body></html>

Open in new window

0
hrolsonsAuthor Commented:
This was just an example, in the real page I'll be displaying data from a database.  What is "A0" and how can I search for and replace it before displaying the data?  Also, how did you figure out there were strange characters?
0
HainKurtSr. System AnalystCommented:
I am using ultraedit
a nice editor ;) not free, you can use notepad++ for the same purpose, and it is free
turn on the hex view to see the character codes... A0

chech here

http://www.simotime.com/asc2ebc1.htm

A0 = 160
32 = 20 : space character

you can use replace(s, ascii(160), ascii(32)) before printing to page...

I am not sure exactly what is the real command in php, use above as a reference... you can add this either to query, or after getting the data, use this before sending/printing to the page...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

SoLostCommented:
First, unless this is data that you're getting from a MySQL database this shouldn't be in the MySQL Server zone as it has nothing to do with MySQL.

Second, it would appear that your spaces aren't "spaces".

If I view the source of your page in a hex editor your spaces show up as HEX "A0" where as on a regular page they show up as HEX "20".

As far as the browser is concerned, since there are no spaces, then there is nothing to wrap.
0
SoLostCommented:
Whoops, someone beat me to it.
0
HainKurtSr. System AnalystCommented:
you are tooooo slow ;)
0
hrolsonsAuthor Commented:
Yes, it is coming from a mySQL db.
0
HainKurtSr. System AnalystCommented:
use this

select ..., replace(field_name,CHAR(160),CHAR(32)) as field_name from ...

instead of just

select ..., field_name from ...
0
HainKurtSr. System AnalystCommented:
or just update your db with

update myTable set col_with_160s = replace(col_with_160s,CHAR(160),CHAR(32))

once your data is fixed, no change is required... I prefer this if no new data will come in existing format...
0
SoLostCommented:
Yes, fixing the data in the database is the way to go but you also have to figure out how it got to be that way in the first place to avoid it happening again.

How was the data inserted into the table?
0
hrolsonsAuthor Commented:
Great, I used this php code and it works perfect:

$field=str_replace(CHR(160),CHR(32),$field);

Now I'm looking at how I wrote the data to the table in the first place.  Should I mention it here or start a new thread?
0
HainKurtSr. System AnalystCommented:
new thread new points ha ha ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.