2

I want to view a word document along with the unicode representation of the special characters.

For example, I want to a word doc containing :

Hi, 
How are you ? 

As ,

Hi \r\n How are you ? 

Is there any way to do this?

Not programatically. Any software or software mode would suffice.

Aneesh
  • 1,703
  • 3
  • 24
  • 34
  • Notations like `\r` and `\n` are not “unicode representations”. They are just notations used in some programming languages, regular expression syntaxes, etc. – Jukka K. Korpela Oct 16 '13 at 10:44

2 Answers2

13

In Word, select the character and press "alt-x".

This appears to be unavailable in Word for Mac version 2016 (according to Microsoft Answers), or in Office 365's version 16.

User5910
  • 463
  • 5
  • 13
JasonPlutext
  • 15,352
  • 4
  • 44
  • 84
  • This is a useful tip (too few people know about this feature) but does not help with the specific example given. You cannot select line breaks. – Jukka K. Korpela Oct 16 '13 at 10:45
  • NB: the same shortcut works in LibreOffice Writer, and presumably OpenOffice as well. – TheDudeAbides Jan 23 '18 at 23:19
  • The corresponding shortcut in Vim is `g8`; this shows the 8-bit Unicode representation of the character under the cursor. ([reference](http://vim.wikia.com/wiki/Working_with_Unicode)) – TheDudeAbides Jan 23 '18 at 23:23
2

If you want to see format control characters as visible symbols, which is what your example is about, then there does not seem to be any direct way. But if you click on the “¶” button (in the Start pane, Paragraph group in new versions of Word), Word adds symbols at ends of visible lines to indicate presence of such controls, e.g.

Hi,·¶
How·are·you?·¶

Here “¶” indicates the presence of CR (U+000D CARRIAGE RETURN, “\r”), whereas a symbol resembling “⤶” would indicate LF (U+000A LINE FEED, “\n”), which indicates a forced line break without paragraph break in Word. And “·” indicates a normal space (U+0020 SPACE), whereas “°” would indicate a no-break space (U+00A0 NO-BREAK SPACE).

For visible characters, the AltX method described by @JasonPlutext works well. You don’t even need to select the character. You can just click between it and the next character, to place the cursor there, and then press AltX.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390