Re: rtf question



Andreas Prilop wrote:
On Mon, 7 Sep 2009, John wrote:

{\u201}tat
Apparently it doesn't like the {\u201} somehow.

No curly brackets around \u201 .

When I code it in line simply as \u201tat , TextEdit eats the
character after the special character, even if I put a blank
after the unicode (as \u201 tat).

The next character is the replacement character for programs
that don't understand Unicode. You could write \u201Etat ,
or simply \u201_tat if you are lazy and know that all your
programs understand \u .

Once again: Read the RTF specification(s).
http://www.google.co.uk/search?q=RTF+specification


I missed a tree while looking at the forest. I didn't realize
that the next character was required and is what is printed if
unicode isn't understood. A good idea really.

It works in TextEdit, NeoOffice, and OpenOffice if I use
{\u201E}tat or \u201Etat . Indeed it now makes sense that
the curly brackets appeared unbalanced in Neo/OpenOffice
because it "ate" the rightmost one, unbalancing them. Somehow,
TextEdit recovers.

Thank you again!
.



Relevant Pages

  • Re: Searching through text string
    ... In VC6 I did the following which worked fine and returned the location. ... Have your build settings changed from ANSI/MBCS to Unicode perhaps? ... Are the contents of that string variable the wrong type of character ... (you've somehow got single byte characters in a Unicode string)? ...
    (microsoft.public.vc.mfc)
  • Re: BSTR not returned correctly
    ... Remember that BSTR contains Unicode ... this means every other byte (not character) is ... zero. ... If you somehow treat it as a regular narrow string, ...
    (microsoft.public.vc.atl)
  • Re: VB - Ascii to Unicode and then Unicode to UTF-8 conversion (Very desperate!!)
    ... Latin together) then you have to use a Unicode column type. ... AscW returns the real Unicode character ... for Chinese characters, ... then the next thing to worry about is your CSV file. ...
    (microsoft.public.vb.general.discussion)
  • Re: Unicode Support
    ... if two Unicode strings are the same? ... UTF-16 is basically telling everyone "ok we all got to start ... character, and will likely support *both* endians. ... UTF-8 encodings are also easy to learn to ...
    (alt.lang.asm)
  • Re: Determining if a string is Unicode
    ... there's nothing magic about Unicode. ... where each character occupies 2 bytes, as opposed to a Single-Byte Character ... You could load up a string with rubbish, ... > INF file like so: ...
    (microsoft.public.vb.general.discussion)