[OpenIndiana-discuss] OI ksh 93t+ needs an update to 93u+
Cedric Blancher
cedric.blancher at gmail.com
Mon May 23 18:21:57 UTC 2016
Last stable version is ksh93v-. There is somewhere an update tree for
Illumos but I don't know exactly where.
Ced
On 23 May 2016 at 20:14, cpforum <cpforum at orange.fr> wrote:
> 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}
>
>
>
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
--
Cedric Blancher <cedric.blancher at gmail.com>
Institute Pasteur
More information about the openindiana-discuss
mailing list