![]() |
#1
|
|||
|
|||
![]()
I was making up an instruction sheet for exercises so I copied text from a document.
I merged the format into my Word Document & it shows a Text Element that I don't recognise. I need to know what it is so that I can enter it into Find & Replace to fix the document. The document is in 11 point Times New Roman. The Dots are a graphic symbol & are not inserted as an automatic Bullet List. I tried to find what the Text Element was by a bit of cheating. I firstly copied the Big Dot used as a manual bullet. I then went to "Insert Symbol" & it showed the Big Dot was the last symbol used. I then copied the Concentric Square Loops symbol that I can't identify. I then went to "Insert Symbol" & it DID NOT show the Concentric Square Loops symbol was the last symbol used. From that I surmise that it is some form of Special Character. I just found out about selecting it & using Alt+X to identify the character. It gives the code 200B. How can I identify this character? How can I insert it in the Find Box for Find & Replace? Is there any way to copy special characters into the Find Box if I have this issue again or to identify them? Thanks, Brian. Last edited by BrianS4; 07-07-2024 at 06:11 AM. Reason: More information |
#2
|
|||
|
|||
![]()
Unicode U+200B is “ZERO WIDTH SPACE”. The corresponding decimal entity is "8203".
Try the following Find/Replace: Find=^u8203 Replace=(leave the Replace box empty) |
#3
|
|||
|
|||
![]()
Thank you Robert2.
I had just finished working out the solution after several hours & many websites. Every stage of the information took several sites to find. I had never seen the No-Width Optional Break or Alt-X, didn't know much about what Unicode was, & didn't know how to do a search with Unicode. No-Width Optional Break (also known as Zero-Width Space or ZWS or ZWSP) Unicode 200B No-Width Non-Break (also known as Zero-Width Non-Joiner or ZWNJ) Unicode 200C I eventually found out that that particular format symbol of concentric rectangles is used for both No-Width Optional Break (also known as Zero-Width Space or ZWS or ZWSP) Unicode 200B & the No-Width Non-Break (also known as Zero-Width Non-Joiner or ZWNJ) Unicode 200C. The No-Width Optional Break is an invisible character that you can insert into a long text that doesn't do anything but tell Word where it can break the text for a new line. This can be used, for example, in a web address so that Word doesn't put the whole address on a new line & leave a big space at the end of the line before. Easy way to find Unicode Number To find the actual character Unicode number, you either select the character, or position the cursor immediately after the character, & press Alt+X then it will convert the Character to the Unicode number of the character. This number is in Hex. The converse also works. Write the Unicode number, select it, then press Alt+X & it will be converted to the Unicode Character. The Alt+X is very handy. Word Search for Unicode Character. To do a search the Unicode Character number must be the decimal equivalent. The decimal equivalent of my Character 200B is 8203 You can then do a Find as shown by Robert2 above: Find what: ^u8203 This finds the Unicode Character with a DECIMAL CODE of 8203 If you use Alt-X to identify the Character then it gives you the HEX CODE so you need to convert it. I just used an online converter to change HEX to DECIMAL Windows Calculator App The Calculator App in Windows 10 can also do conversions between Hex & Decimal, as well as Octal & Binary. Just open the Calculator App & select the PROGRAMMER option. Just click on the Hex line then use keypad & it will automatically show the result in the other number systems. I find a ready to use App easier than a macro - but I haven't really played with macros yet. Many thanks, Brian. Last edited by BrianS4; 07-08-2024 at 09:01 PM. Reason: More Information |
#4
|
|||
|
|||
![]()
When you want to find out which Unicode character corresponds to what Word gives as HEX CODE, go to Unicode Character Finder and enter the hexadecimal value in the Search box. You’ll get all details about the character, including its decimal value.
|
#5
|
||||
|
||||
![]()
You could also use a macro to find out the ascii or asciiWide values to avoid having to use other websites to convert between hex and decimal
Code:
Sub WhatChar() Dim aChar As Range, sReport As String sReport = "Char" & vbTab & "Asc" & vbTab & "AscW" & vbCr For Each aChar In Selection.Range.Characters sReport = sReport & aChar & vbTab & Asc(aChar) & vbTab & AscW(aChar) & vbCr Next aChar MsgBox sReport, vbOKOnly, "Selected characters" End Sub Sub InsertUnicodeChar() Selection.Range.InsertAfter ChrW(8203) End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
|||
|
|||
![]()
The Calculator App in Windows 10 can also do conversions between Hex & Decimal, as well as Octal & Binary.
Just open the Calculator App & select the PROGRAMMER option. Just click on the Hex line then use keypad & it will automatically show the result in the other number systems. I find a ready to use App easier than a macro - but I haven't really played with macros yet. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find-and-Replace Special Characters | davidvargas72 | Word VBA | 8 | 01-28-2023 10:03 PM |
![]() |
WJSwanepoel | Word | 2 | 06-03-2020 01:58 AM |
![]() |
kvnrao | Word VBA | 7 | 11-02-2018 06:28 PM |
![]() |
Thefirstfish` | Word VBA | 5 | 04-06-2017 07:18 PM |
Find & replace a character in a particuler position | klllmmm | Excel | 1 | 07-27-2016 11:27 PM |