By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,303 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,303 IT Pros & Developers. It's quick & easy.

Maddening text sorting problem

P: n/a
Bolt of Silk Cloth
Bolt of Wool Cloth
Bolt of Silk Cloth
Bolt of Wool Cloth

To my untrained eye, these are 2 duplicate lines. But to my compiler,
to Microsoft Access and Excel they are 4 unique lines.

"Bolt of" finds all 4.
"Bolt of S" finds one.

The original document had lots of '' instead of ' ' so I wonder if
thats connected?

I have the feeling of not seeing wood for trees. Anyone know what
might cause such wierdness?

Oct 3 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

pkirk25 wrote:
Bolt of Silk Cloth
Bolt of Wool Cloth
Bolt of Silk Cloth
Bolt of Wool Cloth

To my untrained eye, these are 2 duplicate lines. But to my compiler,
to Microsoft Access and Excel they are 4 unique lines.

"Bolt of" finds all 4.
"Bolt of S" finds one.
try: C:debug badfile.txt
- d 100

look the file over, maybe one of the spaces is a tab or non-breaking
space or other funny control character.

Oct 3 '06 #2

P: n/a
pkirk25 said:
Bolt of Silk Cloth
Bolt of Wool Cloth
Bolt of Silk Cloth
Bolt of Wool Cloth

To my untrained eye, these are 2 duplicate lines. But to my compiler,
to Microsoft Access and Excel they are 4 unique lines.
What you've posted is two sets of two lines, the second set being an exact
copy of the first. What you've posted may not be what you showed Access or
Excel.
The original document had lots of '' instead of ' ' so I wonder if
thats connected?
Cooooouuuuuuld beeee! :-)

You're probably dragging along some formatting junk for the ride, which gets
filtered out in a text format such as Usenet. Just a guess.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Oct 3 '06 #3

P: n/a
Exported to text file with "<br>\n" ending each line, opened in
Firefox, copied and pasted and my sorting routine worked.

Oct 3 '06 #4

P: n/a
pkirk25 said:
Exported to text file with "<br>\n" ending each line, opened in
Firefox, copied and pasted and my sorting routine worked.
Useful exercise for you:

Write a C program to convert each character in a stream of "text" (or
whatever) to hexadecimal representation. (You may find the printf format
string " %02X" useful.)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Oct 3 '06 #5

P: n/a
Richard Heathfield wrote:
pkirk25 said:
>>Exported to text file with "<br>\n" ending each line, opened in
Firefox, copied and pasted and my sorting routine worked.

Useful exercise for you:

Write a C program to convert each character in a stream of "text" (or
whatever) to hexadecimal representation. (You may find the printf format
string " %02X" useful.)
If we are in pedantic mode,
" %0*X"
with '(CHAR_BIT + 3)/4' supplied for the '*' field width or
an appropriate macro version :-)

Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Oct 3 '06 #6

P: n/a
pkirk25 wrote:
Exported to text file with "<br>\n" ending each line, opened in
Firefox, copied and pasted and my sorting routine worked.
What in the world are you talking about? I'm pretty sure this is about
some text markup language and not the C Programming Language.
Oct 3 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.