Discussion:
Latin character coding. netfetch/Hermes/ Messenger/Iris/StromED
(too old to reply)
Chris Craig
2022-07-26 20:58:18 UTC
Permalink
Have I got the wrong characters somewhere. Instead of inverted comma (').
I get on screen & print: Especially if I copy emails into Impression or,
Stronged & edit : aren't =arenã€-t.. Or is this some evil from Android?

Chris
 
--
***@btinternet.com
ARMX6 RISC OS 5.29
---
Steve Fryatt
2022-07-26 22:14:21 UTC
Permalink
On 26 Jul, Chris Craig wrote in message
Post by Chris Craig
Have I got the wrong characters somewhere. Instead of inverted comma (').
I get on screen & print: Especially if I copy emails into Impression or,
Stronged & edit : aren't =arenã€-t.. Or is this some evil from Android?
That looks like UTF-8 Unicode which isn't being decoded/translated into your
local encoding correctly.

Given that UTF-8 is pretty common stuff anywhere but RISC OS, I'd suggest
that it's not an "evil from Android". Instead, I'd take the controversial
view that the software which you're using to bring the files into RISC OS
(Messenger or Iris?) should be doing a better job of translating it[1] into
something that other applications would expect to see.

1. Or at least the very small subset of it that is supported by the current
RISC OS encoding.
--
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/
Harriet Bazley
2022-07-26 22:25:28 UTC
Permalink
On 26 Jul 2022 as I do recall,
Post by Chris Craig
Have I got the wrong characters somewhere. Instead of inverted comma (').
I get on screen & print: Especially if I copy emails into Impression or,
Stronged & edit : aren't =arenã€-t.. Or is this some evil from Android?
I think it's UTF8 encoding, which most RISC OS applications don't
support.

I have a ConvText script that does a search-and-replace for various UTF8
characters so that I can actually reply to e-mails in StrongED; I
believe that recent version of Messenger Pro's internal e-mail editor
do actually support UTF8, but I have a lot of shortcuts and formatting
options setup in StrongED.
--
Harriet Bazley == Loyaulte me lie ==

Strategic withdrawal - running away with dignity!
Chris Newman
2022-07-29 22:30:27 UTC
Permalink
Post by Harriet Bazley
Post by Chris Craig
Have I got the wrong characters somewhere. Instead of inverted comma
('). I get on screen & print: Especially if I copy emails into
Impression or, Stronged & edit : aren't =arenã€-t.. Or is this some
evil from Android?
I think it's UTF8 encoding, which most RISC OS applications don't
support.
I have a ConvText script that does a search-and-replace for various
UTF8 characters so that I can actually reply to e-mails in StrongED; I
believe that recent version of Messenger Pro's internal e-mail editor
do actually support UTF8, but I have a lot of shortcuts and formatting
options setup in StrongED.
Sounds good, Harriet. I haven't used ConvText for ages. Do share how it's
done, please.
--
Chris Newman
Harriet Bazley
2022-07-30 00:22:58 UTC
Permalink
On 29 Jul 2022 as I do recall,
Post by Chris Newman
Post by Harriet Bazley
I have a ConvText script that does a search-and-replace for various
UTF8 characters so that I can actually reply to e-mails in StrongED; I
believe that recent version of Messenger Pro's internal e-mail editor
do actually support UTF8, but I have a lot of shortcuts and formatting
options setup in StrongED.
Sounds good, Harriet. I haven't used ConvText for ages. Do share how it's
done, please.
ConvText syntax is simply <find string> <colon> <replace string>

So you run the app, select "New script" from the iconbar menu, which
will open a blank file with the keyword "SCRIPT:" already entered for
you, give the new script a name (e.g. "SCRIPT: UTF8"), and then enter
all your desired substitutions one by one. UTF8 characters are
generally two bytes wide and translate to a single Latin-1 character. I
normally cut and paste the literal strings as I encounter them, but you
can also encode them in square brackets using their ASCII codes, which
is safer for Usenet purposes.

So the translation
é:� (e-acute)
can more portably be written
[195][169]:[233]

You can add comments using the vertical pipe character, e.g.

[140]:... |Ellipse to three full stops


In order to use your new script, simply save the file and make sure your
new entry is selected in the Scripts sub-menu. Then drag the text you
want to convert to ConvText's iconbar icon, where it will pop up a
savebox to be dragged anywhere sensible. What I usually do is start my
reply in StrongED, select all, drag the selection to ConvText, delete
the selected text in the StrongED message reply window and drag the
ConvText savebox back to save the converted text into the now-empty
window, thus retaining the OLE link from Messenger by keeping the same
file but updating its contents.

You could also do something similar from within StrongED itself, by
updating the News mode to contain a user-defined menu entry that
performs a set of pre-defined search & replace operations, or by using
one of the scripting languages (Lua, awk, BASIC, Python, Perl) which
StrongED knows about in order to apply a script to the contents of the
current window.

I did have a reasonably elegant Lua script for StrongED that did a
general gsub operation with the replacement string simply being a table
holding the UTF8 translations in it; I had to do two passes, one for
the two-character substitutions and then another one for the
three-character substitutions, but it worked. I'm not sure what
happened to it!
--
Harriet Bazley == Loyaulte me lie ==

He who hesitates is sometimes saved.
Loading...