Project

General

Profile

Bug #14000

Updated by Toomas Soome 10 months ago

<pre> 
 $ lorder OBJ/i386-sunos5-gcc/macro.o 
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 0000002288 t _ZL16init_arch_macrosv 
 0000002706 t _ZL16init_mach_macrosv 
 0000009220 t _ZL24expand_value_with_daemonP5_NameP9_PropertyP7_String7BooleanS5_ 
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 0000002288 t _ZL16init_arch_macrosv 
 0000002706 t _ZL16init_mach_macrosv 
 0000009220 t _ZL24expand_value_with_daemonP5_NameP9_PropertyP7_String7BooleanS5_ 
 tsoome@beastie:/code/schilytools-code/schily-2021-07-29/sunpro/Make/lib/mksh/src$ env LC_ALL=C    lorder OBJ/i386-sunos5-gcc/macro.o 
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 tsoome@beastie:/code/schilytools-code/schily-2021-07-29/sunpro/Make/lib/mksh/src$  
 </pre> 

 replacing sequence a-z with    [:lower:] will fix sed to use lower case chars. The issue about [a-z] sequence is, in et_EE locale, the collation sequence is .. r s z t u .. and this is the reason reason, why we see those symbols. 

 char sequence versus charclass issue is about collation order and normally should be controlled by LC_COLLATE (unless LC_ALL is set). For some reason, sed does not seem to accept LC_COLLATE to set collation order for char sequence. However, setting LC_ALL does: 
 <pre> 
 root@beastie:~# locale 
 LANG=et_EE.UTF-8 
 LC_CTYPE=et_EE.UTF-8 
 LC_NUMERIC="et_EE.UTF-8" 
 LC_TIME="et_EE.UTF-8" 
 LC_COLLATE="et_EE.UTF-8" 
 LC_MONETARY="et_EE.UTF-8" 
 LC_MESSAGES="et_EE.UTF-8" 
 LC_ALL=et_EE.UTF-8 
 root@beastie:~# echo absztuv | sed 's/[a-z]//g' 
 tuv 
 root@beastie:~# echo absztuv | env LC_COLLATE=C sed 's/[a-z]//g' 
 tuv 
 root@beastie:~# echo absztuv | env LC_COLLATE=C.UTF-8 sed 's/[a-z]//g' 
 tuv 
 root@beastie:~# echo absztuv | env LC_ALL=C.UTF-8 sed 's/[a-z]//g' 

 root@beastie:~# 
 </pre> 

 And testing with patched lorder: 
 <pre> 
 tsoome@beastie:/code/schilytools-code/schily-2021-07-29/sunpro/Make/lib/mksh/src$ locale 
 LANG=et_EE.UTF-8 
 LC_CTYPE=et_EE.UTF-8 
 LC_NUMERIC="et_EE.UTF-8" 
 LC_TIME="et_EE.UTF-8" 
 LC_COLLATE="et_EE.UTF-8" 
 LC_MONETARY="et_EE.UTF-8" 
 LC_MESSAGES="et_EE.UTF-8" 
 LC_ALL=et_EE.UTF-8 
 tsoome@beastie:/code/schilytools-code/schily-2021-07-29/sunpro/Make/lib/mksh/src$ lorder OBJ/i386-sunos5-gcc/macro.o  
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 OBJ/i386-sunos5-gcc/macro.o OBJ/i386-sunos5-gcc/macro.o 
 tsoome@beastie:/code/schilytools-code/schily-2021-07-29/sunpro/Make/lib/mksh/src$  
 </pre>

Back