All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: development@efficientek.com
Subject: Re: [PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test
Date: Wed, 25 Aug 2021 11:34:47 +0200	[thread overview]
Message-ID: <18749360916363390519@scdbackup.webframe.org> (raw)
In-Reply-To: <17ddccb2ea35790b2effaf6bbe7d9acc4628f48c.1629874373.git.development@efficientek.com>

Hi,

Glenn Washburn wrote:
> LANG must be set to something that supports international characters,
> otherwise xorriso will refuse to include the file with name having
> international characters, causing the test to fail.

Can you tell me the exact error message from xorriso ?
I have some difficulties with reproducing the situation.

Your description is plausible, because libisofs takes its character set
default from nl_langinfo(3) with item CODESET and uses iconv(3) to
convert the file names to the output charset.

I would like to bring up for discussion an alternative remedy by these
xorrisofs options:

  -input-charset UTF-8 -output-charset UTF-8

-----------------------------------------------------------------------

I am quite sure that it will work, but have problems with creating the
situation where it shall be the remedy.
On a system with configured LANG=en_US.UTF-8 i fail to reproduce
the issue with LANG=C or LANG="" unless i add the explicit demand to
convert to UTF-8.

My disappointingly unproblematic xorriso test run is

  ( LANG=  xorrisofs -o test.iso 'ÄÖÜß' )

with various attempts to set the locale charset away from UTF-8:
LANG, LANGUAGE, LC_ALL set to empty text or to "C".
LANG= causes nl_langinfo(CODESET) to return "ANSI_X3.4-1968" but iconv(3)
throws no error when it shall convert "\303\204\303\226\303\234\303\237".

I get warning messages if i tell xorriso to aim for output charset UTF-8
while LANG is empty and the file name contains non-ASCII characters:

  (LANG= xorrisofs -o test.iso -output-charset UTF-8 'ÄÖÜß')

yields three times

  libisofs: WARNING : Charset conversion error. Cannot convert ÄÖÜß from ANSI_X3.4-1968 to UTF-8
  libisofs: NOTE :  > Caused by: Charset conversion error

Inspection of test.iso shows that the file name 'ÄÖÜß' was defaulted to
name '________'.

Adding the other charset option

  (LANG= xorrisofs -o test.iso \
            -input-charset UTF-8 -output-charset UTF-8 'ÄÖÜß')

yields a run without warning messages resulting in Rock Ridge file name
'ÄÖÜß'.

So i assume that my proposal is a valid alternative to setting LANG=UTF-8.
Whether it is preferrable over setting LANG to UTF-8 would have to be
discussed.
At least it would be nice for me to know why LANG= causes trouble in
the GRUB tests but not on my command line.
(I see nothing in the xorriso runs of tests/util/grub-fs-tester.in which
would be equivalent to the run which fails to convert 'ÄÖÜß' here.)


Have a nice day :)

Thomas



  reply	other threads:[~2021-08-25  9:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  7:03 [PATCH v2 0/8] Various fixes/improvements for tests Glenn Washburn
2021-08-25  7:03 ` [PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test Glenn Washburn
2021-08-25  9:34   ` Thomas Schmitt [this message]
2021-08-25 19:49     ` Glenn Washburn
2021-08-26  6:53       ` Thomas Schmitt
2021-08-26 17:06         ` Glenn Washburn
2021-08-26 17:49         ` Thomas Schmitt
2021-08-26 20:16           ` Glenn Washburn
2021-08-26 21:28             ` Thomas Schmitt
2021-08-26 22:30               ` Glenn Washburn
2021-08-27 19:13                 ` Thomas Schmitt
2021-08-27 20:03                   ` Glenn Washburn
2021-08-27 21:23                     ` Thomas Schmitt
2021-08-25  7:03 ` [PATCH v2 2/8] tests: Fix partmap_test for arm*-efi, disk numbering has changed Glenn Washburn
2021-10-06 13:45   ` Daniel Kiper
2021-08-25  7:03 ` [PATCH v2 3/8] tests: When checking squashfs fstime, use superblock last modified time Glenn Washburn
2021-10-06 13:46   ` Daniel Kiper
2021-08-25  7:03 ` [PATCH v2 4/8] tests: Fail immediately when grub-shell fails and do not occlude the error code Glenn Washburn
2021-10-06 13:57   ` Daniel Kiper
2021-10-06 20:05     ` Glenn Washburn
2021-10-07 12:37       ` Daniel Kiper
2021-10-07 15:35         ` Glenn Washburn
2021-08-25  7:03 ` [PATCH v2 5/8] tests: Make setup errors in grub-fs-tester hard errors Glenn Washburn
2021-10-06 15:26   ` Daniel Kiper
2021-08-25  7:04 ` [PATCH v2 6/8] tests: A failure of mktemp should cause the test script to exit with code 99 Glenn Washburn
2021-10-06 15:28   ` Daniel Kiper
2021-08-25  7:04 ` [PATCH v2 7/8] tests: Exit with skipped exit code when test not performed Glenn Washburn
2021-09-17 21:42   ` Glenn Washburn
2021-10-06 15:34     ` Daniel Kiper
2021-08-25  7:04 ` [PATCH v2 8/8] tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell Glenn Washburn
2021-10-06 15:37   ` Daniel Kiper

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18749360916363390519@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=development@efficientek.com \
    --cc=grub-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.