[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Corrupted multibyte characters in command substitutions fixes may be
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem. |
Date: |
Mon, 7 Feb 2022 11:55:50 +0100 |
On Mon, Feb 7, 2022 at 7:45 AM Lawrence Velázquez <vq@larryv.me> wrote:
>
> On Mon, Feb 7, 2022, at 1:26 AM, Alex fxmbsw7 Ratchev wrote:
> > well i saw now, printf a char of "\0" results in 0 bytes out to wc -c
>
> % /usr/bin/printf '\0' | wc -c
> 1
>
>
> > however my solution still stays
> > you just use memory locations instead of c strings
> > and those entries in memory are of course of known length, before setting
> > and all is fine
>
> "Your" solution is decades old. Everyone knows how Pascal-style
> strings work. This is not cutting-edge computer science.
i dunno what pascal strings are, sorry
> > of course this means to not use these fauly 'c strings', but a self
> > coded solution
>
> As Greg already mentioned, such a system requires converting back
> to C strings for system calls and other external APIs. It's not
> insurmountable, but it's more involved than just swapping all your
> char * to my_string or whatever
hard work this way i see
sorry, thanks.
>
> I repeat:
>
> >> It's so simple that you should have no problem converting the entire
> >> bash codebase to Pascal-style strings yourself. We'll wait.
>
>
> --
> vq
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., (continued)
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Chet Ramey, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Alex fxmbsw7 Ratchev, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Greg Wooledge, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Alex fxmbsw7 Ratchev, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Lawrence Velázquez, 2022/02/07
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Alex fxmbsw7 Ratchev, 2022/02/07
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Lawrence Velázquez, 2022/02/07
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem.,
Alex fxmbsw7 Ratchev <=
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Ángel, 2022/02/07
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Alex fxmbsw7 Ratchev, 2022/02/07
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Robert Elz, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Chet Ramey, 2022/02/06
- Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem., Alex fxmbsw7 Ratchev, 2022/02/06