473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Maddening text sorting problem

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
6 1503

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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dont bother | last post by:
This is really driving me crazy. I have a dictionary feature_vectors{}. I try to sort its keys using #apply sorting on feature_vectors sorted_feature_vector=feature_vectors.keys()...
9
by: jwedel_stolo | last post by:
Hi I'm creating a dataview "on the fly" in order to sort some data prior to writing out the information to a MS SQL table I have used two methods in order to determine the sort order of the...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
1
by: pemigh | last post by:
I have a report with pages breaking in the middle of text box controls. And it's not just on a line-by-line basis, but sometimes (in a situation that I can no longer recreate) just the bottom...
4
by: Robert Hooker | last post by:
Hi all, I'm looking for a way to sort/order the Category text items in a property grid. The grids sort the categories by alpha when the catergories are displayed. Does anyone at Microsoft (or...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
4
by: justin tyme | last post by:
Hello Experts! I would like to combine (which may not be the correct technical term) two text fields from the same table in a query. Specifically, text field A and text field B are both lists of...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.