From: Mike Gran <spk121@yahoo.com>
To: guile-devel <guile-devel@gnu.org>
Subject: scm_to_locale_stringbuf
Date: Tue, 3 Feb 2009 08:25:48 -0800 (PST) [thread overview]
Message-ID: <493834.3827.qm@web37902.mail.mud.yahoo.com> (raw)
Hi,
The description for scm_to_locale_stringbuf doesn't specify
what happens when the final multibyte character doesn't fit
in the provided string buffer.
size_t scm_to_locale_stringbuf (SCM str, char *buf, size_t max_len)
Say the locale is UTF-8, and the last position in BUF would be
the first byte of a two-byte character. The right thing is not
to copy that first byte of the character into the last position
of BUF, but, instead copy a '\0'. But there is no way to indicate
to the caller that the final '\0' is padding and not a true '\0'.
Ideas?
Thanks,
Mike Gran
next reply other threads:[~2009-02-03 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 16:25 Mike Gran [this message]
2009-02-03 22:48 ` scm_to_locale_stringbuf Neil Jerram
2009-02-03 23:46 ` scm_to_locale_stringbuf Mike Gran
2009-02-04 0:23 ` scm_to_locale_stringbuf Neil Jerram
2009-02-05 22:26 ` scm_to_locale_stringbuf Ludovic Courtès
2009-02-08 21:41 ` scm_to_locale_stringbuf Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=493834.3827.qm@web37902.mail.mud.yahoo.com \
--to=spk121@yahoo.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).