Re: Accented characters

Anton Ertl <anton-8NJIiSa5LzB3ZGU3T6kWFyEcasqEdqbRs2V0tQ3P5b8@public.gmane.org>
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <[email protected]>
On Thu, May 03, 2018 at 10:14:32PM -0400, Mario Beaulieu wrote:
> Hi,
> 
> The problem I'm having might not have anything to do with GForth, but let's see. I'm running GForth on a Raspberry Pi (Linux).
> 
> I have a GForth program (notification.fs) that sends notifications to my cell phone. The problem I have is that it replaces accented characters (à, è, é, etc.) with question marks but only if I run it from the command line , like:
>                  GForth notification.fs
> 
> What the file notification.fs does, is compile the necessary words, the main one being SendNotification, and the last line sends a message, like:
>                  s" àéèeeeee"  SendNotification
> 
> If I run it from the command line, it replaces the accented characters, but if I start GForth first and paste the content of notification.fs, it works perfectly.
> 
> Even weirder, if I 'redo' the last line right after running it from the command line, it works!
> 
> The character encoding is UTF-8. I tried with ISO8859-1, with the same result.
> 
> Any idea?

I have no idea what's going on, but you can see what's going on by
doing a 2DUP DUMP before sending the string.  Then you see the bytes
that are sent.

A wild guess is that the string is encoded in some other encoding in
the file, which the editor recognizes, and there is some conversion
going on in the cut-and-paste process.

I am not sure what you mean with 'redo'.

- anton
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.