I am back in time with a bunch of styled text files (rtf).

And they are displayed like ©Ò?.

I rebuild (from scratch) one of them, using Apple’s TextEdit and setting the whole RTF data to RTFData:

TA_Description.StyledText.RTFData = Item_TIS.ReadAll

But, on El Capitan / 2015r1, one’s better go to the beach than using that.

I searched, but not found how I do that (using MacOSLib or do).

And I do not searched for Windows (I do not have my Windows 10 handly).

What is the 2018 Wojo situation with rtf ?

And if no one use it nowaday, how are-you displaying styled text ?

Encoding trouble. Please pass text though without conversion from one encoding to other.

Thanks Christian, but no: these are UTF8 data. The characters are correctly displayed. (Data origin: <meta charset="UTF-8"/>).

The trouble started with alignment (all text centered), so I removd the center in the leading line (and set it to left aligned).

Then, every ines were in the same one (Returns ignored).

I passed the text to no styles (RAW Text), then Styled and do the style handly.

Then the \Tabs were jagged (not aligned as expected with tabs *).

Then I started a quest for the declares, do not found them locally, search in the internet and nearly send my laptop through the (bathroom) window of my local McDonalds (where I currently am).

And after a while, I tried (politely, with calm I tried) to ask for help here. And that project size is only 49KB

  • Even my typewriter from the 60s works fine with Tab but not Mojo. Id better take an old issue and go read it outside and get some sun rays (very nice weather today).

That charset declaration looks like html…

I think Christian is talking about

[quote=386536:@Emile Schwarz]Item_TIS.Encoding = Encodings.UTF8
TA_Description.StyledText.RTFData = Item_TIS.ReadAll[/quote]


Yes, the data source. To avoid troubles, I changed thetext to RAW, then I set styles to it.

These are descriptions to the nice map drawn in a Canvas above the TextArea.

Sasha: yes, I understand that. Here’s more of the used code…

Item_TIS = TextInputStream.Open(Item_FI)
Item_TIS.Encoding = Encodings.UTF8
TA_Description.StyledText.RTFData = Item_TIS.ReadAll

  Catch e As IOException
    MsgBox("Error accessing file.")
  End Try[/code]