🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4857

Multibyte and wide-character support

#4857
From: Jamshid Afshar
Date: Mon, 04 Mar 1996 08:26
21 lines
1234 bytes
Is there an easy way to test if a multibyte string contains only
singlebyte characters and thus can be passed to a function expecting a
"regular" char*?  Is "if (strlen(mbs)==mblen(mbs))" a valid test and
is there anything better?

Why aren't there wchar_t versions of functions like atoi() strtod()?
Do they just have to be converted to multibyte strings, and do atoi(),
etc. work with multibyte strings?

Btw, VC++4's docs say that if mbstowcs()'s wchar_t* destination
argument is NULL then the function doesn't do a conversion of the
multibyte string; it just returns the size needed to store the
multibyte string.  Accepting a NULL first argument is not required by
Standard C, is it?  Also, the VC++4 docs seem to indicate fputws(), a
wchar_t version of fputs(), is "ANSI" compatible.  Standard C doesn't
actually specify any wide-character i/o functions, does it?

Thanks,
Jamshid Afshar
jamshid@io.com
Technical Details
Message-ID: <4he9gg$m9l@pentagon.io.com>
Path: arc1-ca.pugleaf.net!io.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!io.com!not-for-mail
From: jamshid@io.com (Jamshid Afshar)
Newsgroups: comp.std.c
Subject: Multibyte and wide-character support
Date: 4 Mar 1996 02:26:56 -0600
Organization: Illuminati Online, Austin, Texas, USA
Message-ID: <4he9gg$m9l@pentagon.io.com>
NNTP-Posting-Host: pentagon.io.com