A NOTE has been added to this issue. 
====================================================================== 
https://austingroupbugs.net/view.php?id=243 
====================================================================== 
Reported By:                dwheeler
Assigned To:                ajosey
====================================================================== 
Project:                    1003.1(2008)/Issue 7
Issue ID:                   243
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Objection
Priority:                   normal
Status:                     Under Review
Name:                       David A. Wheeler 
Organization:               IDA 
User Reference:              
Section:                    find 
Page Number:                2740 
Line Number:                89194 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2010-04-29 19:23 UTC
Last Modified:              2022-12-09 12:09 UTC
====================================================================== 
Summary:                    Add -print0 to "find"
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0000244 Add -0 to xargs
related to          0000245 Add -0 option to shell's "read"
has duplicate       0000903 Please, add find -print0, xargs -0, rea...
====================================================================== 

---------------------------------------------------------------------- 
 (0006095) stephane (reporter) - 2022-12-09 12:09
 https://austingroupbugs.net/view.php?id=243#c6095 
---------------------------------------------------------------------- 
To clarify my previous comment, I find that LC_ALL=C or LC_ALL=POSIX is not
needed in the specific case of IFS= read -rd '' var, but that's not
necessarily the case if $IFS it not empty or -r is not supplied or for
other values of delimiters (even single byte ones).  I find ksh93u+m (one
of the ksh93 forks with read -d '' support, I've not tested  others) and
zsh are quite buggy, I'm busy raising bug reports ATM.

It may be worth specifying that IFS= read -rd '' var should be able to read
arbitrary byte values into a variable.

About yash, I think it's rather or also that yash doesn't support changing
locale charmap midway through a script (within a shell invocation). For a
shell that works character-based always, that's hardly surprising. if, from
within a UTF-8 locale, printf '\200' | LC_ALL=C read var worked, where 0x80
is not a defined character in most C locales, what would a subsequent
printf %s "$var", output when charmap is back to UTF-8? The UTF-8 encoding
of some undefined character? And there's the reverse problem if calling
LC_ALL=C.UTF-8 read from within a locale where the charmap has fewer
characters.

It's true though that on my system, printf '\200' | LC_ALL=C yash -c 'read
var' fails as mbrtowc() fails with EILSEQ which is not  allowed by POSIX.
 
In any case, yash can only be used with text data, encoded in the charmap
of the locale that was in effect at the time yash was invoked. In the C
locale, on GNU systems at least (where wchar_t uses the Unicode codepoint),
it can only deal with ASCII. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-29 19:23 dwheeler       New Issue                                    
2010-04-29 19:23 dwheeler       Status                   New => Under Review 
2010-04-29 19:23 dwheeler       Assigned To               => ajosey          
2010-04-29 19:23 dwheeler       Name                      => David A. Wheeler
2010-04-29 19:23 dwheeler       Organization              => IDA             
2010-04-29 19:23 dwheeler       Section                   => find            
2010-04-29 19:23 dwheeler       Page Number               => 2740            
2010-04-29 19:23 dwheeler       Line Number               => 89194           
2011-07-06 23:42 Don Cragun     Relationship added       related to 0000244  
2011-07-06 23:42 Don Cragun     Relationship added       related to 0000245  
2011-07-06 23:54 Don Cragun     Note Added: 0000882                          
2011-11-16 18:22 dwheeler       Note Added: 0001020                          
2015-03-12 16:15 Don Cragun     Relationship added       has duplicate 0000903
2022-12-08 15:39 geoffclare     Note Added: 0006091                          
2022-12-08 15:40 geoffclare     Note Edited: 0006091                         
2022-12-08 16:21 stephane       Note Added: 0006092                          
2022-12-08 16:23 stephane       Note Edited: 0006092                         
2022-12-08 16:32 stephane       Note Added: 0006093                          
2022-12-08 17:02 stephane       Note Edited: 0006093                         
2022-12-09 10:22 geoffclare     Note Edited: 0006091                         
2022-12-09 10:30 geoffclare     Note Edited: 0006091                         
2022-12-09 10:44 geoffclare     Note Edited: 0006091                         
2022-12-09 10:50 geoffclare     Note Added: 0006094                          
2022-12-09 11:21 geoffclare     Note Edited: 0006091                         
2022-12-09 12:09 stephane       Note Added: 0006095                          
======================================================================


  • [1003.1(2008... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: Add... Stephane Chazelas via austin-group-l at The Open Group
      • Re:... Geoff Clare via austin-group-l at The Open Group
        • ... Steffen Nurpmeso via austin-group-l at The Open Group
        • ... Stephane Chazelas via austin-group-l at The Open Group
          • ... Geoff Clare via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
      • Re:... Stephane Chazelas via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
          • ... Stephane Chazelas via austin-group-l at The Open Group
            • ... Stephane Chazelas via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to