­
Computer Language in The AnswerBank: Technology
Donate SIGN UP

Computer Language

Avatar Image
Henry1865 | 18:43 Sat 01st Feb 2025 | Technology
10 Answers

Is it possible for there to be more than one 'character/symbol' for a space?

In an index of surnames with a space:-

O Brien

O Fee

O Sullivan

this is correctly followed by another group

O'Dell

O'Mara

O'Sullivan

But then follows another set similar to the first group, without the apostrophe. After sorting, I would have expected this one to be merged wih the first group. 

 

 

 

 

Gravatar
Rich Text Editor, the_answer

Answers

1 to 10 of 10rss feed

Best Answer

No best answer has yet been selected by Henry1865. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.

I've known non-breaking spaces to be available sometimes, but I'm unsure if there's a specific ASCII code for it.

Unsure why, when being sorted, you expect a space to be considered the same as an apostrophe though.

It depends on what type of encoding the file is using.

https://www.compart.com/en/unicode/category/Zs

There are a number of non-printing spaces (characters) that could be causing this effect – most likely I would guess would be a non-breaking space, this prevents the ‘O’ being at the end of a line, with the name on the next.

 

This would be a logical space to place between the O and name – if the list is in Word, you can see the space type by switching on the formatting (or non-printing) characters (the backwards looking ‘P’ within the Toolbar paragraph block).  In this mode a non-breaking space appears as a degree symbol.

 

If you check out the Special Character set within Word there are other symbols/characters that could cause this effect, such as the No-Width Non Break.

Question Author

Thanks for all responses.

I don't understand your query Old Geezer. I expect to see two separate blocks of names only, one with and one without an apostrophe.

 

Can you copy and paste some of the problem names here to see if the issue can be identified?

"I expect to see two separate blocks of names only, one with and one without an apostrophe."

 

But that is the opposite of what you put.

 

"After sorting, I would have expected this one to be merged wih the first group."

 

A sort uses the ASCII collating sequence a space is X'20' an apostrophie is X'27' so the space ones will always preceed the apostrophie.

In that situation I would replace the apostrophie with a space and flag the line, sort them and then put the apostrophie back in all the flagged lines.

Question Author

Old Geezer. Rephrasing but with exactly the same meaning:-

After sorting I would expect the third group to be merged with the third, the middle group with apostrophes to remain separate. That seems clear enough to me.

Question Author

Old Geezer, please ignore msg sent just now. It shld read

Question Author

Old Geezer. Rephrasing but with exactly the same meaning:-

After sorting I would expect the third group to be merged with the first, the middle group with apostrophes to remain separate. That seems clear enough to me.

 

 

There is a "substitute" function in excel so you could have the offending group in one column and use the substitute function in the next column to substitute the offending "O?" with "O ", where the "?" represents whatever it is that looks like a space but isn't.

Copy the "O" including the offending part and paste that into the substitute function.

You would then copy and paste the results in the already sorted column but mind and use the "paste values" option.

See if that helps any.

 

1 to 10 of 10rss feed

Complete your gift to make an impact