Mercurial > octave
view build-aux/find-files-with-tests.sh @ 32072:f7206b6577c2 stable
unicode2native: Fix conversion to UTF-16 (bug #64139).
* liboctave/wrappers/uniconv-wrappers.c (octave_u8_conv_to_encoding_intern):
Avoid appending a zero-byte when converting to UTF-* to avoid having to strip
a varying number of bytes after the conversion.
* scripts/strings/unicode2native.m: Add test for conversion to UTF-16.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Wed, 03 May 2023 20:43:36 +0200 |
parents | 597f3ee61a48 |
children |
line wrap: on
line source
#! /bin/sh ######################################################################## ## ## Copyright (C) 2013-2023 The Octave Project Developers ## ## See the file COPYRIGHT.md in the top-level directory of this ## distribution or <https://octave.org/copyright/>. ## ## This file is part of Octave. ## ## Octave is free software: you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## <https://www.gnu.org/licenses/>. ## ######################################################################## set -e GREP=${GREP:-grep} SED=${SED:-sed} srcdir="$1" if [ "$1" ]; then shift fi for arg do if [ -f "$arg" ]; then file="$arg" else file="$srcdir/$arg" fi if [ -f "$file" ]; then if [ "`$GREP -l '^%!' $file`" ]; then echo "$file" | $SED "s,\\$srcdir/,," fi fi done