Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.os.vms Subject: Re: C and C++, promotion, stabilization, migration (was: Re: New VSI post on Youtube) Date: Mon, 19 Aug 2024 23:33:46 -0000 (UTC) Organization: A noiseless patient Spider Lines: 16 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 20 Aug 2024 01:33:47 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e67b5fd56ab8be94cd7ba99433918e9e"; logging-data="3227415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YhmsYCXeHeQWZUlqrXScc" User-Agent: Pan/0.159 (Vovchansk; ) Cancel-Lock: sha1:qUbjl30PudBEAqmq9DAhakvCfew= Bytes: 1693 On Mon, 19 Aug 2024 16:05:59 -0400, Stephen Hoffman wrote: > strings and character encoding are more "fun": If a system/library call is going to return a dynamic amount of data, it is good if it can give some indication of how much data it is going to return first. The best calls are the ones that, if you pass NULL for the buffer, they will return the number of bytes they would have put in the buffer. So you allocate that size of buffer and do a second call, and get back the actual buffer data. I did a Python wrapper for Fribidi, and unfortunately its text-encoding conversion calls didn’t work that way. But then, they probably couldn’t ...