From 8162695451b6b2fc94585082feaf15b99c9407ee Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Mon, 4 Jan 2021 16:37:54 +0100 Subject: [PATCH] mycommands: set custom locale, explain LC_COLLATE --- commands.sh | 5 ++--- mycommands.sh | 19 +++++++++++++++++-- mycommands.sh.clean | 16 +++++++++++++++- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/commands.sh b/commands.sh index 6d76673..cad0010 100644 --- a/commands.sh +++ b/commands.sh @@ -15,11 +15,10 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v1.21-0-gc85af77 +#### $$VERSION$$ v1.25-dev-0-gd310805 # -# adjust your language setting here, e.g. when run from other user or cron. -# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment +# bashbot locale defaults to c.UTF-8, adjust locale in mycommands.sh if needed export 'LC_ALL=C.UTF-8' export 'LANG=C.UTF-8' export 'LANGUAGE=C.UTF-8' diff --git a/mycommands.sh b/mycommands.sh index e5acad7..99c8d72 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -9,10 +9,25 @@ # #### mycommands.clean # # shellcheck disable=SC1117 -#### $$VERSION$$ v1.21-0-gc85af77 +#### $$VERSION$$ v1.25-dev-0-gd310805 # -# uncomment the following lines to overwrite info and help messages +########## +# adjust your language setting here, default is C.UTF-8 +# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment +export 'LC_ALL=C.UTF-8' +export 'LANG=C.UTF-8' +export 'LANGUAGE=C.UTF-8' + +########## +# in UTF-8 äöü etc. are part of [:alnum:] and ranges (e.g. a-z) +# for more information see doc/4_expert.md#Character_classes +# uncomment next line if you want classic ASCII ranges for [a-z] etc. +#export LC_COLLATE=C + + +########## +# edit the following lines to fit your bot usage # use ${ME} for current bot name in messages # Note: you must escape '_' in botname with two \ in markdown messages! export bashbot_info='This is @'"${ME//_/\\\\_}"', the Telegram example bot written entirely in bash. diff --git a/mycommands.sh.clean b/mycommands.sh.clean index f8abce8..eae37af 100644 --- a/mycommands.sh.clean +++ b/mycommands.sh.clean @@ -4,9 +4,23 @@ # files: mycommands.sh.clean # copy to mycommands.sh and add all your commands and functions here ... # -#### $$VERSION$$ v1.21-0-gc85af77 +#### $$VERSION$$ v1.25-dev-0-gd310805 # +########## +# adjust your language setting here, default is C.UTF-8 +# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment +export 'LC_ALL=C.UTF-8' +export 'LANG=C.UTF-8' +export 'LANGUAGE=C.UTF-8' + +########## +# in UTF-8 äöü etc. are part of [:alnum:] and ranges (e.g. a-z) +# for more information see doc/4_expert.md#Character_classes +# uncomment next line if you want classic ASCII ranges for [a-z] etc. +#export LC_COLLATE=C + + ########## # edit the following lines to fit your bot usage