• fossil: encoding in commit messages

    From Meredith Montgomery@mmontgomery@levado.to to comp.misc on Sat Oct 1 11:11:46 2022
    From Newsgroup: comp.misc

    As far as I can tell in my GNU EMACS, all by buffers relevant to context
    here are set to UTF-8. I see the letter U in the first letter of the
    modeline --- the GNU EMACS status bar.

    When I add an UTF-8 message through the command line in ESHELL, it
    doesn't display properly when I say ``fossil timeline''. Check it:

    --8<---------------cut here---------------start------------->8---
    %fs add encoding.txt
    ADDED encoding.txt

    %fs commit -m 'Naïve commit.'
    Pull from https://mer@somewhere.edu/test
    Round-trips: 1 Artifacts sent: 0 received: 0
    Pull done, wire bytes sent: 442 received: 1959 ip: 5.161.138.46
    New_Version: f4c20ecefc9d04d5fd2548eb4d3008d9ffb759a4deebedd595b222f81eef6b1f Sync with https://mer@somewhere.edu/test
    Round-trips: 1 Artifacts sent: 2 received: 0
    Sync done, wire bytes sent: 2342 received: 309 ip: 5.161.138.46

    %fs timeline
    === 2022-10-01 ===
    14:03:28 [f4c20ecefc] *CURRENT* Naïve commit. (user: mer tags: trunk)
    [...]
    --8<---------------cut here---------------end--------------->8---

    However, if instead of the command-line, I use a regular GNU EMACS
    buffer, it works just fine.

    --8<---------------cut here---------------start------------->8---
    %echo kkk >> encoding.txt

    %fs commit
    Pull from https://mer@somewhere.edu/test
    Round-trips: 1 Artifacts sent: 0 received: 0
    Pull done, wire bytes sent: 437 received: 2118 ip: 5.161.138.46
    emacsclientw ./ci-comment-A2803F45F10B.txt
    Waiting for Emacs...
    Pull from https://mer@somewhere.edu/test
    Round-trips: 1 Artifacts sent: 0 received: 0
    Pull done, wire bytes sent: 441 received: 2118 ip: 5.161.138.46
    New_Version: 09ea1b5d5b8d776d61a74bb412cd58bd8b6f82323c2f539a1eb0d915f7026f20 Sync with https://mer@somewhere.edu/test
    Round-trips: 1 Artifacts sent: 2 received: 0
    Sync done, wire bytes sent: 2496 received: 309 ip: 5.161.138.46

    %fs timeline
    === 2022-10-01 ===
    14:09:39 [09ea1b5d5b] *CURRENT* Naiveté. (user: mer tags: trunk) --8<---------------cut here---------------end--------------->8---

    I know. You'll tell me go to a GNU EMACS newsgroup. I'll look for
    one. Thank you.
    --- Synchronet 3.19c-Linux NewsLink 1.113
  • From Spiros Bousbouras@spibou@gmail.com to comp.misc,gnu.emacs.help on Sat Oct 1 14:41:41 2022
    From Newsgroup: comp.misc

    On Sat, 01 Oct 2022 11:11:46 -0300
    Meredith Montgomery <mmontgomery@levado.to> wrote:
    As far as I can tell in my GNU EMACS, all by buffers relevant to context
    here are set to UTF-8. I see the letter U in the first letter of the modeline --- the GNU EMACS status bar.

    When I add an UTF-8 message through the command line in ESHELL, it
    doesn't display properly when I say ``fossil timeline''. Check it:

    --8<---------------cut here---------------start------------->8---
    %fs add encoding.txt
    ADDED encoding.txt

    %fs commit -m 'Naïve commit.'

    [...]

    14:03:28 [f4c20ecefc] *CURRENT* Naïve commit. (user: mer tags: trunk)

    So the issue is that you are getting Naïve rather than Naïve , right ? Try creating a simple shell script which writes its argument to a file ,
    do
    %yourscript 'Naïve commit.'

    and see if the file gets the correct string.

    [...]
    --8<---------------cut here---------------end--------------->8---

    However, if instead of the command-line, I use a regular GNU EMACS
    buffer, it works just fine.

    --8<---------------cut here---------------start------------->8---
    %echo kkk >> encoding.txt

    %fs commit

    [...]

    %fs timeline
    === 2022-10-01 ===

    14:09:39 [09ea1b5d5b] *CURRENT* Naiveté. (user: mer tags: trunk) --8<---------------cut here---------------end--------------->8---

    I know. You'll tell me go to a GNU EMACS newsgroup. I'll look for
    one. Thank you.

    See my crossposting.
    --
    vlaho.ninja/prog
    --- Synchronet 3.19c-Linux NewsLink 1.113
  • From Meredith Montgomery@mmontgomery@levado.to to comp.misc,gnu.emacs.help on Sat Oct 1 15:55:40 2022
    From Newsgroup: comp.misc

    Spiros Bousbouras <spibou@gmail.com> writes:

    On Sat, 01 Oct 2022 11:11:46 -0300
    Meredith Montgomery <mmontgomery@levado.to> wrote:
    As far as I can tell in my GNU EMACS, all by buffers relevant to context
    here are set to UTF-8. I see the letter U in the first letter of the
    modeline --- the GNU EMACS status bar.

    When I add an UTF-8 message through the command line in ESHELL, it
    doesn't display properly when I say ``fossil timeline''. Check it:

    --8<---------------cut here---------------start------------->8---
    %fs add encoding.txt
    ADDED encoding.txt

    %fs commit -m 'Naïve commit.'

    [...]

    14:03:28 [f4c20ecefc] *CURRENT* Naïve commit. (user: mer tags: trunk)

    So the issue is that you are getting Naïve rather than Naïve , right ?

    Yes.

    Try creating a simple shell script which writes its argument to a file
    , do %yourscript 'Naïve commit.'

    and see if the file gets the correct string.

    It seems to do it correctly.

    --8<---------------cut here---------------start------------->8--- %./arg2-to-arg1.exe naïve test.txt
    %cat test.txt
    naïve%

    %cat arg2-to-arg1.c
    #include <stdio.h>
    #include <unistd.h>

    int main(int argc, char *argv[]) {
    if (argc < 3) {
    printf("usage: %s <string> <file>\n", argv[0]);
    exit(10);
    }
    FILE* out = fopen(argv[2], "w");
    if (out == NULL) { perror("fopen"); exit(1); }

    if (fputs(argv[1], out) == EOF) { perror("fputs"); exit(2); }
    return 0;
    }
    %--8<---------------cut here---------------end--------------->8---

    [...]
    --8<---------------cut here---------------end--------------->8---

    However, if instead of the command-line, I use a regular GNU EMACS
    buffer, it works just fine.

    --8<---------------cut here---------------start------------->8---
    %echo kkk >> encoding.txt

    %fs commit

    [...]

    %fs timeline
    === 2022-10-01 ===

    14:09:39 [09ea1b5d5b] *CURRENT* Naiveté. (user: mer tags: trunk)
    --8<---------------cut here---------------end--------------->8---

    I know. You'll tell me go to a GNU EMACS newsgroup. I'll look for
    one. Thank you.

    See my crossposting.

    Thank you!
    --- Synchronet 3.19c-Linux NewsLink 1.113