[OpenIndiana-discuss] OI ksh 93t+ needs an update to 93u+

cpforum cpforum at orange.fr
Mon May 23 18:14:43 UTC 2016


OpenIndiana ksh release (93t+ 2010-03-05) needs an update.

- OI ksh is not the last release (RHEL and CentOS have 93u+ 2012-08-01

- OI ksh has some bugs corrected in 93u+
For example typeset -u (uppercase conv) and typeset -l (lowercase conv) do not work with French Locale


# ksh
# locale 
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_ALL=

# typeset -u X=azertyéèçàùêë
# echo $X 
AZERTYéèçàùêë 
# typeset -l y=ABCDEÊËÖÏÜÔÛ 
# echo $y 
abcde����������

Works with CentOS ksh93u+



- 93u+ has some more features than 93t+




PS.

Here is an example

#!/bin/ksh

print ${.sh.version}

typeset -T String_t=(

typeset -h "Chaine de caractères" s=""

len()
{
print -r ${#_.s}
}

uc()
{
typeset -u ucase=${_.s}
print -r $ucase
}

lc()
{
typeset -l lcase=${_.s}
print -r $lcase
}

ucfirst()
{
typeset -u ucase=${_.s}
typeset -l lcase=${_.s}
print -r ${ucase:0:1}${lcase:1}
}

)

String_t --man # very powerfull autogen documentation


String_t string

string.s="Simple Object Programming"


i=${string.len}
print $i
print ${string.uc}
print ${string.lc}
print ${string.ucfirst}


string.s="Test avec UTF-8 utf-8 éèçàù ÉÈÇÀÙ"
print ${string.uc}
print ${.string.lc}





More information about the openindiana-discuss mailing list