A NOTE has been added to this issue. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1920 
====================================================================== 
Reported By:                stephane
Assigned To:                
====================================================================== 
Project:                    1003.1(2013)/Issue7+TC1
Issue ID:                   1920
Category:                   Shell and Utilities
Type:                       Omission
Severity:                   Objection
Priority:                   normal
Status:                     New
Name:                       Stephane Chazelas 
Organization:                
User Reference:              
Section:                    read utility, stdin section 
Page Number:                3321 
Line Number:                112915 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2025-04-21 07:16 UTC
Last Modified:              2025-04-24 11:23 UTC
====================================================================== 
Summary:                    read -d '' on invalid text without -r and IFS=
====================================================================== 

---------------------------------------------------------------------- 
 (0007149) stephane (reporter) - 2025-04-24 11:23
 https://www.austingroupbugs.net/view.php?id=1920#c7149 
---------------------------------------------------------------------- 
So does that mean that for instance, with IFS=m, Stéphane should be split into
$'St\210' and phane in a locale that uses BIG5-HKSCS (where é is encoded as
0x88 0x6d and m as 0x6d).

That's not what I observe with any of the shells that support multi-byte text,
only those that don't:

$ LANG=zh_HK luit
$ locale charmap
BIG5-HKSCS
$ bash -o posix -o noglob -c 'IFS=m; printf "<%q>\n" $1' bash Stéphane
<Stéphane>
$ ksh93 -o posix -o noglob -c 'IFS=m; printf "<%q>\n" $1' bash Stéphane
<Stéphane>
$ zsh --emulate sh -o noglob -c 'IFS=m; printf "<%q>\n" $1' bash Stéphane
<Stéphane>
$ yash -o posix -o noglob -c 'IFS=m; printf "<%q>\n" $1' bash Stéphane
printf: `q' is not a valid conversion specifier
$ yash -o posix -o noglob -c 'IFS=m; /bin/printf "<%q>\n" $1' bash Stéphane
<Stéphane>
$ dash -o noglob -c 'IFS=m; /bin/printf "<%q>\n" $1' bash Stéphane
<'St'$'\210'>
<phane> 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2025-04-21 07:16 stephane       New Issue                                    
2025-04-21 07:30 stephane       Note Added: 0007139                          
2025-04-21 07:38 stephane       Note Edited: 0007139                         
2025-04-22 14:46 geoffclare     Note Added: 0007140                          
2025-04-22 15:20 hvd            Note Added: 0007141                          
2025-04-22 18:45 chet_ramey     Note Added: 0007142                          
2025-04-23 14:59 dwheeler       Note Added: 0007143                          
2025-04-23 16:47 stephane       Note Added: 0007144                          
2025-04-23 16:57 stephane       Note Added: 0007145                          
2025-04-23 19:53 dwheeler       Note Added: 0007146                          
2025-04-24 10:54 geoffclare     Note Added: 0007147                          
2025-04-24 10:55 geoffclare     Note Edited: 0007147                         
2025-04-24 11:00 geoffclare     Note Added: 0007148                          
2025-04-24 11:23 stephane       Note Added: 0007149                          
======================================================================


  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
    • Re: (... Stephane Chazelas via austin-group-l at The Open Group
    • Re: [... Hans Åberg via austin-group-l at The Open Group

Reply via email to