support for recode as convertor
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-07-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* lang/sync_lang.sh: support for multiple convertors (recode added),
|
||||||
|
thanks to Michal Cihar
|
||||||
|
|
||||||
2002-07-17 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-07-17 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* libraries/common.lib.php3, libraries/config_import.lib.php3: Added
|
* libraries/common.lib.php3, libraries/config_import.lib.php3: Added
|
||||||
$cfg['PmaNoRelation_DisableWarning'] to the backwards compatibility code.
|
$cfg['PmaNoRelation_DisableWarning'] to the backwards compatibility code.
|
||||||
|
@@ -5,6 +5,19 @@
|
|||||||
# Written by Michal Cihar <nijel at users.sourceforge.net>
|
# Written by Michal Cihar <nijel at users.sourceforge.net>
|
||||||
##
|
##
|
||||||
|
|
||||||
|
##
|
||||||
|
# convertor setup
|
||||||
|
##
|
||||||
|
# CONVERTOR_PARAMS is used for printf and it also receives two params: source
|
||||||
|
# and target charset
|
||||||
|
#
|
||||||
|
#for iconv
|
||||||
|
#CONVERTOR=iconv
|
||||||
|
#CONVERTOR_PARAMS="-f %s -t %s"
|
||||||
|
#for recode:
|
||||||
|
CONVERTOR=recode
|
||||||
|
CONVERTOR_PARAMS="%s..%s"
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# names of translations to process
|
# names of translations to process
|
||||||
@@ -89,16 +102,16 @@ for base in $BASE_TRANSLATIONS ; do
|
|||||||
if [ $charset = 'utf-8' ] ; then
|
if [ $charset = 'utf-8' ] ; then
|
||||||
# if we convert to utf-8, we should add allow_recoding
|
# if we convert to utf-8, we should add allow_recoding
|
||||||
is_utf=yes
|
is_utf=yes
|
||||||
iconv -f $src_charset -t $charset $base.inc.php3| sed -e "s/$src_charset/$charset/" -e '/\$charset/a\
|
$CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| sed -e "s/$src_charset/$charset/" -e '/\$charset/a\
|
||||||
$allow_recoding = TRUE;' > $file
|
$allow_recoding = TRUE;' > $file
|
||||||
echo done
|
echo done
|
||||||
elif [ $src_charset = 'utf-8' ] ; then
|
elif [ $src_charset = 'utf-8' ] ; then
|
||||||
# if we convert fomo utf-8, we should remove allow_recoding
|
# if we convert fomo utf-8, we should remove allow_recoding
|
||||||
iconv -f $src_charset -t $charset $base.inc.php3| grep -v allow_recoding > $file
|
$CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| grep -v allow_recoding > $file
|
||||||
echo done
|
echo done
|
||||||
else
|
else
|
||||||
# just convert
|
# just convert
|
||||||
iconv -f $src_charset -t $charset $base.inc.php3| sed "s/$src_charset/$charset/" > $file
|
$CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| sed "s/$src_charset/$charset/" > $file
|
||||||
echo done
|
echo done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user