[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gforth] Accented characters
From: |
Anton Ertl |
Subject: |
Re: [gforth] Accented characters |
Date: |
Fri, 4 May 2018 07:40:08 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
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