emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get buffer byte length (not number of characters)?


From: Eli Zaretskii
Subject: Re: How to get buffer byte length (not number of characters)?
Date: Fri, 23 Aug 2024 15:34:09 +0300

> From: Joseph Turner <joseph@ushin.org>
> Cc: emacs-devel@gnu.org,  schwab@suse.de,  adam@alphapapa.net
> Date: Fri, 23 Aug 2024 00:37:33 -0700
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> How do we encode if find-coding-systems-region returns '(undecided)?
> >
> > Use buffer-file-coding-system.
> >
> > If this is an interactive command, you could also use
> > select-safe-coding-system, which calls find-coding-systems-region
> > internally, and also has complex logic for finding suitable callbacks
> > and asking the user to select an encoding if it fails to find
> > something suitable.  But this is not appropriate in non-interactive
> > code.
> 
> Thank you!  If both find-coding-systems-region and
> buffer-file-coding-system are undecided, then is it safe to fallback to
> utf-8?

Yes.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]