Deutsch   English   Français   Italiano  
<va0koq$32fon$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
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: <va0koq$32fon$1@dont-email.me>
References: <v9kske$uqhh$2@dont-email.me> <va04hl$2viks$2@dont-email.me>
	<va08j7$30gmu$1@dont-email.me>
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 ...