remove non-UTF-8

This commit is contained in:
Marc Delisle
2007-09-04 16:59:39 +00:00
parent 86e8de4285
commit 3e460af6cf
73 changed files with 29 additions and 68904 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,282 +0,0 @@
#!/bin/sh
# $Id$
##
# Shell script that synchronises all translations in phpMyAdmin
##
# Any parameters (except --iconv/--recode) will be passed to grep to filter
# processed translation, for example: './sync_lang.sh czech' will process only
# czech translation, './sync_lang.sh -e czech -e english' will process czech
# and english translations.
##
# Written by Michal Cihar <nijel at users.sourceforge.net>
##
# Changes:
# 2005-12-08
# * less verbose output to allow quick overview
# 2005-11-29
# * hack for multibyte chars, so that \'; at the end will not fool PHP
# 2004-09-22
# * default to iconv, as it doesn't break things as recode does
# 2004-09-03
# * hack for hebrew
# 2003-11-18
# * switch php3 -> php
# 2003-04-14
# * convert only files that are needed to convert (checks mtime), --force to
# avoid this checking
# * get charset from filename when reading from file failed
# * report failed translations at the end
# 2002-09-18
# * now accepts parameters --iconv/--recode for specifying which convertor
# to use
# 2002-08-13
# * support for synchronisation only for selected language(s)
# 2002-07-18
# * can exclude some languages from conversion
# 2002-07-17
# * support for multiple convertors (recode added)
##
##
# convertor setup
##
# CONVERTOR_PARAMS is used for printf and it also receives two params: source
# and target charset
#
case "$1" in
--iconv)
echo Using iconv on user request
CONVERTOR=iconv
# the space on following is REQUIRED
CONVERTOR_PARAMS=" -f %s -t %s"
shift
;;
--recode)
echo Using recode on user request
echo '(please use iconv for arabic)'
CONVERTOR=recode
CONVERTOR_PARAMS=" -f %s..%s"
shift
;;
*)
echo Using iconv as default, force with --iconv/--recode
CONVERTOR=iconv
# the space on following is REQUIRED
CONVERTOR_PARAMS=" -f %s -t %s"
;;
esac
if [ "$1" = "--force" ] ; then
FORCE=1
shift
else
FORCE=0
fi
##
# names of translations to process
##
# Here should be listed all translations for which conversion should be done.
# The name is filename without inc.php.
#
BASE_TRANSLATIONS="afrikaans-iso-8859-1
albanian-iso-8859-1
arabic-windows-1256
azerbaijani-iso-8859-9
basque-iso-8859-1
belarusian_cyrillic-windows-1251
belarusian_latin-utf-8
bosnian-windows-1250
brazilian_portuguese-iso-8859-1
bulgarian-utf-8
catalan-utf-8
chinese_traditional-utf-8
chinese_simplified-gb2312
croatian-windows-1250
czech-utf-8
danish-iso-8859-1
dutch-iso-8859-1
english-iso-8859-1
estonian-iso-8859-1
finnish-iso-8859-1
french-iso-8859-1
galician-iso-8859-1
german-utf-8
greek-iso-8859-7
hebrew-iso-8859-8-i
hungarian-iso-8859-2
indonesian-iso-8859-1
italian-iso-8859-1
japanese-utf-8
korean-utf-8
latvian-windows-1257
lithuanian-windows-1257
malay-iso-8859-1
macedonian_cyrillic-windows-1251
norwegian-iso-8859-1
persian-windows-1256
polish-iso-8859-2
portuguese-iso-8859-1
romanian-iso-8859-1
russian-windows-1251
serbian_cyrillic-utf-8
serbian_latin-utf-8
slovenian-iso-8859-2
slovak-utf-8
spanish-iso-8859-1
swedish-iso-8859-1
tatarish-iso-8859-9
thai-utf-8
turkish-utf-8
ukrainian-windows-1251"
##
# which translations should not be translated to utf-8
##
# List here any translation that should not be converted to utf-8. The name is
# same as above.
#
IGNORE_UTF=""
##
# which translations should not be automatically generated
##
# List here any translation should not be automatically generated from base
# translation for that language (usually for those which are not correctly
# supported by convertor).
#
IGNORE_TRANSLATIONS="
russian-cp-866"
##
# end of configuration, you hopefully won't need to edit anything bellow
##
TEMPFILE=`mktemp /tmp/pma-sync-lang.XXXXXX`
cleanup() {
rm -f $TEMPFILE
}
trap cleanup INT ABRT TERM
FAILED=""
echo "-------------------------------------------------------------------"
# go through all file we should process
for base in $BASE_TRANSLATIONS ; do
if [ "$#" -gt 0 ] ; then
if ( echo $base | grep -q "$@" ) ; then
true
else
continue
fi
fi
# grep language from basename
lang=$(echo $base|sed 's%-.*%%')
# which files will we create from current?
create_files=$(ls --color=none -1 $lang*.inc.php|grep -v $base.inc.php)
for ignore in $IGNORE_TRANSLATIONS ; do
create_files=$(echo "$create_files" | grep -v $ignore)
done
# charset of source file
src_charset=$(grep '\$charset' $base.inc.php | sed "s%^[^'\"]*['\"]\\([^'\"]*\\)['\"][^'\"]*$%\\1%")
replace_charset=$src_charset
# special case for hebrew
if [ $src_charset = 'iso-8859-8-i' ] ; then
src_charset=iso-8859-8
fi
echo -n "$base [charset $src_charset]"
# do we already have utf-8 translation?
if [ $src_charset = 'utf-8' ] ; then
is_utf=yes
else
is_utf=no
fi
# at first update existing translations
for file in $create_files ; do
# charset of destination file
# grepping from file causes problems when it is empty...
charset=$(grep '\$charset' $file | sed "s%^[^'\"]*['\"]\\([^'\"]*\\)['\"][^'\"]*$%\\1%")
if [ -z "$charset" ] ; then
charset=$(echo $file | sed -e 's/^[^-]*-//' -e 's/\.inc\.php\?$//')
fi
if [ $charset = 'utf-8' ] ; then
is_utf=yes
fi
# check whether we need to update translation
if [ ! "$base.inc.php" -nt "$file" -a "$FORCE" -eq 0 -a -s "$file" ] ; then
echo -n " ($file:ok)"
continue
fi
echo -n " ($file:to $charset:"
if [ $charset = 'utf-8' ] ; then
# if we convert to utf-8, we should add allow_recoding
is_utf=yes
$CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed -e "s/$replace_charset/$charset/" -e '/\$charset/a\
$allow_recoding = TRUE;' > $TEMPFILE
elif [ $src_charset = 'utf-8' ] ; then
is_utf=yes
# if we convert from utf-8, we should remove allow_recoding
$CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| grep -v allow_recoding | sed "s/$replace_charset/$charset/" > $TEMPFILE
else
# just convert
$CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed "s/$replace_charset/$charset/" > $TEMPFILE
fi
if [ -s $TEMPFILE ] ; then
sed "s/\\\\';[[:space:]]\+$/\\\\\\\\';/" $TEMPFILE > $file
echo -n 'done)'
else
FAILED="$FAILED $file"
echo -n 'FAILED)'
fi
done
# now check whether we found utf-8 translation
if [ $is_utf = no ] ; then
if ( echo $IGNORE_UTF | grep -q $base ) ; then
# utf-8 should not be created
true
else
# we should create utf-8 translation
charset=utf-8
file=$lang-$charset.inc.php
echo -n " [$file:$charset:"
$CONVERTOR $(printf "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php| sed -e "s/$replace_charset/$charset/" -e '/\$charset/a\
$allow_recoding = TRUE;' > $TEMPFILE
if [ -s $TEMPFILE ] ; then
cat $TEMPFILE > $file
echo -n 'done)'
else
FAILED="$FAILED $file"
echo -n 'FAILED)'
fi
fi
fi
echo
done
echo "-------------------------------------------------------------------"
if [ -z "$FAILED" ] ; then
echo "Everything seems to went okay"
else
echo "!!!SOME CONVERSION FAILED!!!"
echo "Following file were NOT updated:"
echo
echo "$FAILED"
echo
echo "!!!SOME CONVERSION FAILED!!!"
fi
cleanup

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -499,10 +499,12 @@ if (file_exists('./lang/added_messages.php')) {
}
/**
* Includes the language file if it hasn't been included yet
* lang detection is done here
*/
require './libraries/language.lib.php';
require_once './libraries/select_lang.lib.php';
// Load the translation
require_once $lang_path . $available_languages[$GLOBALS['lang']][1] . '.inc.php';
/**
* check for errors occurred while loading configuration
@@ -812,13 +814,6 @@ if (! defined('PMA_MINIMUM_COMMON')) {
@ini_set('track_errors', $bkp_track_err);
unset($bkp_track_err);
/**
* If we auto switched to utf-8 we need to reread messages here
*/
if (defined('PMA_LANG_RELOAD')) {
require './libraries/language.lib.php';
}
/**
* SQL Parser code
*/

View File

@@ -772,7 +772,6 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null
/**
* @uses ./libraries/charset_conversion.lib.php
* @uses PMA_DBI_QUERY_STORE
* @uses PMA_REMOVED_NON_UTF_8
* @uses PMA_MYSQL_INT_VERSION
* @uses PMA_MYSQL_STR_VERSION
* @uses PMA_DBI_GETVAR_SESSION
@@ -825,33 +824,6 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
}
if (PMA_MYSQL_INT_VERSION >= 40100) {
// If $lang is defined and we are on MySQL >= 4.1.x,
// we auto-switch the lang to its UTF-8 version (if it exists and user
// didn't force language)
if (!empty($GLOBALS['lang'])
&& (substr($GLOBALS['lang'], -5) != 'utf-8')
&& !isset($GLOBALS['cfg']['Lang'])) {
$lang_utf_8_version =
substr($GLOBALS['lang'], 0, strpos($GLOBALS['lang'], '-'))
. '-utf-8';
if (!empty($GLOBALS['available_languages'][$lang_utf_8_version])) {
$GLOBALS['lang'] = $lang_utf_8_version;
$GLOBALS['charset'] = 'utf-8';
define('PMA_LANG_RELOAD', 1);
}
}
// and we remove the non-UTF-8 choices to avoid confusion
if (!defined('PMA_REMOVED_NON_UTF_8')) {
foreach ($GLOBALS['available_languages'] as $each_lang => $dummy) {
if (substr($each_lang, -5) != 'utf-8') {
unset($GLOBALS['available_languages'][$each_lang]);
}
}
define('PMA_REMOVED_NON_UTF_8', 1);
}
$mysql_charset = $GLOBALS['mysql_charset_map'][$GLOBALS['charset']];
if ($is_controluser
|| empty($GLOBALS['collation_connection'])

View File

@@ -75,9 +75,10 @@ function PMA_select_language($use_fieldset = FALSE) {
}
// Include charset if it makes sense
if (!defined('PMA_REMOVED_NON_UTF_8')) {
$lang_name .= ' (' . substr($id, strpos($id, '-') + 1) . ')';
}
// (no longer need this I guess)
//if (!defined('PMA_REMOVED_NON_UTF_8')) {
// $lang_name .= ' (' . substr($id, strpos($id, '-') + 1) . ')';
//}
//Is current one active?
if ($lang == $id) {

View File

@@ -1,17 +0,0 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin Language Loading File
*
* @version $Id$
*/
/**
* lang detection is done here
*/
require_once './libraries/select_lang.lib.php';
// Load the translation
require_once $lang_path . $available_languages[$GLOBALS['lang']][1] . '.inc.php';
?>

View File

@@ -7,7 +7,7 @@
*/
/**
* trys to find the language to use
* tries to find the language to use
*
* @uses $GLOBALS['cfg']['lang']
* @uses $GLOBALS['cfg']['DefaultLang']
@@ -159,7 +159,7 @@ $GLOBALS['lang_path'] = './lang/';
/**
* @global string interface language
*/
$GLOBALS['lang'] = 'en-iso-8859-1';
$GLOBALS['lang'] = 'en-utf-8';
/**
* @global boolean wether loading lang from cfg failed
*/
@@ -203,137 +203,65 @@ $GLOBALS['text_dir'] = 'ltr';
* traditional) must be detected before 'zh' (chinese simplified) for
* example.
*
* When there are more than one charset for a language, we put the -utf-8
* last because we need the default charset to be non-utf-8 to avoid
* problems on MySQL < 4.1.x if AllowAnywhereRecoding is FALSE.
*
* For Russian, we put 1251 first, because MSIE does not accept 866
* and users would not see anything.
*/
/**
* @global array supported languages
*/
$GLOBALS['available_languages'] = array(
'af-iso-8859-1' => array('af|afrikaans', 'afrikaans-iso-8859-1', 'af', ''),
'af-utf-8' => array('af|afrikaans', 'afrikaans-utf-8', 'af', ''),
'ar-win1256' => array('ar|arabic', 'arabic-windows-1256', 'ar', '&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;'),
'ar-utf-8' => array('ar|arabic', 'arabic-utf-8', 'ar', '&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;'),
'az-iso-8859-9' => array('az|azerbaijani', 'azerbaijani-iso-8859-9', 'az', 'Az&#601;rbaycanca'),
'az-utf-8' => array('az|azerbaijani', 'azerbaijani-utf-8', 'az', 'Az&#601;rbaycanca'),
'becyr-win1251' => array('be|belarusian', 'belarusian_cyrillic-windows-1251', 'be', '&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1072;&#1103;'),
'becyr-utf-8' => array('be|belarusian', 'belarusian_cyrillic-utf-8', 'be', '&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1072;&#1103;'),
'belat-utf-8' => array('be[-_]lat|belarusian latin', 'belarusian_latin-utf-8', 'be-lat', 'Byelorussian'),
'bg-win1251' => array('bg|bulgarian', 'bulgarian-windows-1251', 'bg', '&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;'),
'bg-koi8-r' => array('bg|bulgarian', 'bulgarian-koi8-r', 'bg', '&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;'),
'bg-utf-8' => array('bg|bulgarian', 'bulgarian-utf-8', 'bg', '&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;'),
'bs-win1250' => array('bs|bosnian', 'bosnian-windows-1250', 'bs', 'Bosanski'),
'bs-utf-8' => array('bs|bosnian', 'bosnian-utf-8', 'bs', 'Bosanski'),
'ca-iso-8859-1' => array('ca|catalan', 'catalan-iso-8859-1', 'ca', 'Catal&agrave;'),
'ca-utf-8' => array('ca|catalan', 'catalan-utf-8', 'ca', 'Catal&agrave;'),
'cs-iso-8859-2' => array('cs|czech', 'czech-iso-8859-2', 'cs', '&#268;esky'),
'cs-win1250' => array('cs|czech', 'czech-windows-1250', 'cs', '&#268;esky'),
'cs-utf-8' => array('cs|czech', 'czech-utf-8', 'cs', '&#268;esky'),
'da-iso-8859-1' => array('da|danish', 'danish-iso-8859-1', 'da', 'Dansk'),
'da-utf-8' => array('da|danish', 'danish-utf-8', 'da', 'Dansk'),
'de-iso-8859-1' => array('de|german', 'german-iso-8859-1', 'de', 'Deutsch'),
'de-iso-8859-15' => array('de|german', 'german-iso-8859-15', 'de', 'Deutsch'),
'de-utf-8' => array('de|german', 'german-utf-8', 'de', 'Deutsch'),
'el-iso-8859-7' => array('el|greek', 'greek-iso-8859-7', 'el', '&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;'),
'el-utf-8' => array('el|greek', 'greek-utf-8', 'el', '&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;'),
'en-iso-8859-1' => array('en|english', 'english-iso-8859-1', 'en', ''),
'en-iso-8859-15' => array('en|english', 'english-iso-8859-15', 'en', ''),
'en-utf-8' => array('en|english', 'english-utf-8', 'en', ''),
'es-iso-8859-1' => array('es|spanish', 'spanish-iso-8859-1', 'es', 'Espa&ntilde;ol'),
'es-iso-8859-15' => array('es|spanish', 'spanish-iso-8859-15', 'es', 'Espa&ntilde;ol'),
'es-utf-8' => array('es|spanish', 'spanish-utf-8', 'es', 'Espa&ntilde;ol'),
'et-iso-8859-1' => array('et|estonian', 'estonian-iso-8859-1', 'et', 'Eesti'),
'et-utf-8' => array('et|estonian', 'estonian-utf-8', 'et', 'Eesti'),
'eu-iso-8859-1' => array('eu|basque', 'basque-iso-8859-1', 'eu', 'Euskara'),
'eu-utf-8' => array('eu|basque', 'basque-utf-8', 'eu', 'Euskara'),
'fa-win1256' => array('fa|persian', 'persian-windows-1256', 'fa', '&#1601;&#1575;&#1585;&#1587;&#1740;'),
'fa-utf-8' => array('fa|persian', 'persian-utf-8', 'fa', '&#1601;&#1575;&#1585;&#1587;&#1740;'),
'fi-iso-8859-1' => array('fi|finnish', 'finnish-iso-8859-1', 'fi', 'Suomi'),
'fi-iso-8859-15' => array('fi|finnish', 'finnish-iso-8859-15', 'fi', 'Suomi'),
'fi-utf-8' => array('fi|finnish', 'finnish-utf-8', 'fi', 'Suomi'),
'fr-iso-8859-1' => array('fr|french', 'french-iso-8859-1', 'fr', 'Fran&ccedil;ais'),
'fr-iso-8859-15' => array('fr|french', 'french-iso-8859-15', 'fr', 'Fran&ccedil;ais'),
'fr-utf-8' => array('fr|french', 'french-utf-8', 'fr', 'Fran&ccedil;ais'),
'gl-iso-8859-1' => array('gl|galician', 'galician-iso-8859-1', 'gl', 'Galego'),
'gl-utf-8' => array('gl|galician', 'galician-utf-8', 'gl', 'Galego'),
'he-iso-8859-8-i' => array('he|hebrew', 'hebrew-iso-8859-8-i', 'he', '&#1506;&#1489;&#1512;&#1497;&#1514;'),
'he-utf-8' => array('he|hebrew', 'hebrew-utf-8', 'he', '&#1506;&#1489;&#1512;&#1497;&#1514;'),
'hi-utf-8' => array('hi|hindi', 'hindi-utf-8', 'hi', '&#2361;&#2367;&#2344;&#2381;&#2342;&#2368;'),
'hr-win1250' => array('hr|croatian', 'croatian-windows-1250', 'hr', 'Hrvatski'),
'hr-iso-8859-2' => array('hr|croatian', 'croatian-iso-8859-2', 'hr', 'Hrvatski'),
'hr-utf-8' => array('hr|croatian', 'croatian-utf-8', 'hr', 'Hrvatski'),
'hu-iso-8859-2' => array('hu|hungarian', 'hungarian-iso-8859-2', 'hu', 'Magyar'),
'hu-utf-8' => array('hu|hungarian', 'hungarian-utf-8', 'hu', 'Magyar'),
'id-iso-8859-1' => array('id|indonesian', 'indonesian-iso-8859-1', 'id', 'Bahasa Indonesia'),
'id-utf-8' => array('id|indonesian', 'indonesian-utf-8', 'id', 'Bahasa Indonesia'),
'it-iso-8859-1' => array('it|italian', 'italian-iso-8859-1', 'it', 'Italiano'),
'it-iso-8859-15' => array('it|italian', 'italian-iso-8859-15', 'it', 'Italiano'),
'it-utf-8' => array('it|italian', 'italian-utf-8', 'it', 'Italiano'),
'ja-euc' => array('ja|japanese', 'japanese-euc', 'ja', '&#26085;&#26412;&#35486;'),
'ja-sjis' => array('ja|japanese', 'japanese-sjis', 'ja', '&#26085;&#26412;&#35486;'),
'ja-utf-8' => array('ja|japanese', 'japanese-utf-8', 'ja', '&#26085;&#26412;&#35486;'),
'ko-euc-kr' => array('ko|korean', 'korean-euc-kr', 'ko', '&#54620;&#44397;&#50612;'),
'ko-utf-8' => array('ko|korean', 'korean-utf-8', 'ko', '&#54620;&#44397;&#50612;'),
'ka-utf-8' => array('ka|georgian', 'georgian-utf-8', 'ka', '&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;'),
'lt-win1257' => array('lt|lithuanian', 'lithuanian-windows-1257', 'lt', 'Lietuvi&#371;'),
'lt-utf-8' => array('lt|lithuanian', 'lithuanian-utf-8', 'lt', 'Lietuvi&#371;'),
'lv-win1257' => array('lv|latvian', 'latvian-windows-1257', 'lv', 'Latvie&scaron;u'),
'lv-utf-8' => array('lv|latvian', 'latvian-utf-8', 'lv', 'Latvie&scaron;u'),
'mkcyr-win1251' => array('mk|macedonian', 'macedonian_cyrillic-windows-1251', 'mk', 'Macedonian'),
'mkcyr-utf-8' => array('mk|macedonian', 'macedonian_cyrillic-utf-8', 'mk', 'Macedonian'),
'mn-utf-8' => array('mn|mongolian', 'mongolian-utf-8', 'mn', '&#1052;&#1086;&#1085;&#1075;&#1086;&#1083;'),
'ms-iso-8859-1' => array('ms|malay', 'malay-iso-8859-1', 'ms', 'Bahasa Melayu'),
'ms-utf-8' => array('ms|malay', 'malay-utf-8', 'ms', 'Bahasa Melayu'),
'nl-iso-8859-1' => array('nl|dutch', 'dutch-iso-8859-1', 'nl', 'Nederlands'),
'nl-iso-8859-15' => array('nl|dutch', 'dutch-iso-8859-15', 'nl', 'Nederlands'),
'nl-utf-8' => array('nl|dutch', 'dutch-utf-8', 'nl', 'Nederlands'),
'no-iso-8859-1' => array('no|norwegian', 'norwegian-iso-8859-1', 'no', 'Norsk'),
'no-utf-8' => array('no|norwegian', 'norwegian-utf-8', 'no', 'Norsk'),
'pl-iso-8859-2' => array('pl|polish', 'polish-iso-8859-2', 'pl', 'Polski'),
'pl-win1250' => array('pl|polish', 'polish-windows-1250', 'pl', 'Polski'),
'pl-utf-8' => array('pl|polish', 'polish-utf-8', 'pl', 'Polski'),
'ptbr-iso-8859-1' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-iso-8859-1', 'pt-BR', 'Portugu&ecirc;s'),
'ptbr-utf-8' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-utf-8', 'pt-BR', 'Portugu&ecirc;s'),
'pt-iso-8859-1' => array('pt|portuguese', 'portuguese-iso-8859-1', 'pt', 'Portugu&ecirc;s'),
'pt-iso-8859-15' => array('pt|portuguese', 'portuguese-iso-8859-15', 'pt', 'Portugu&ecirc;s'),
'pt-utf-8' => array('pt|portuguese', 'portuguese-utf-8', 'pt', 'Portugu&ecirc;s'),
'ro-iso-8859-1' => array('ro|romanian', 'romanian-iso-8859-1', 'ro', 'Rom&acirc;n&#259;'),
'ro-utf-8' => array('ro|romanian', 'romanian-utf-8', 'ro', 'Rom&acirc;n&#259;'),
'ru-win1251' => array('ru|russian', 'russian-windows-1251', 'ru', '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;'),
'ru-cp-866' => array('ru|russian', 'russian-cp-866', 'ru', '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;'),
'ru-koi8-r' => array('ru|russian', 'russian-koi8-r', 'ru', '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;'),
'ru-utf-8' => array('ru|russian', 'russian-utf-8', 'ru', '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;'),
'si-utf-8' => array('si|sinhala', 'sinhala-utf-8', 'si', '&#3523;&#3538;&#3458;&#3524;&#3517;'),
'sk-iso-8859-2' => array('sk|slovak', 'slovak-iso-8859-2', 'sk', 'Sloven&#269;ina'),
'sk-win1250' => array('sk|slovak', 'slovak-windows-1250', 'sk', 'Sloven&#269;ina'),
'sk-utf-8' => array('sk|slovak', 'slovak-utf-8', 'sk', 'Sloven&#269;ina'),
'sl-iso-8859-2' => array('sl|slovenian', 'slovenian-iso-8859-2', 'sl', 'Sloven&scaron;&#269;ina'),
'sl-win1250' => array('sl|slovenian', 'slovenian-windows-1250', 'sl', 'Sloven&scaron;&#269;ina'),
'sl-utf-8' => array('sl|slovenian', 'slovenian-utf-8', 'sl', 'Sloven&scaron;&#269;ina'),
'sq-iso-8859-1' => array('sq|albanian', 'albanian-iso-8859-1', 'sq', 'Shqip'),
'sq-utf-8' => array('sq|albanian', 'albanian-utf-8', 'sq', 'Shqip'),
'srlat-win1250' => array('sr[-_]lat|serbian latin', 'serbian_latin-windows-1250', 'sr-lat', 'Srpski'),
'srlat-utf-8' => array('sr[-_]lat|serbian latin', 'serbian_latin-utf-8', 'sr-lat', 'Srpski'),
'srcyr-win1251' => array('sr|serbian', 'serbian_cyrillic-windows-1251', 'sr', '&#1057;&#1088;&#1087;&#1089;&#1082;&#1080;'),
'srcyr-utf-8' => array('sr|serbian', 'serbian_cyrillic-utf-8', 'sr', '&#1057;&#1088;&#1087;&#1089;&#1082;&#1080;'),
'sv-iso-8859-1' => array('sv|swedish', 'swedish-iso-8859-1', 'sv', 'Svenska'),
'sv-utf-8' => array('sv|swedish', 'swedish-utf-8', 'sv', 'Svenska'),
'th-tis-620' => array('th|thai', 'thai-tis-620', 'th', '&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;'),
'th-utf-8' => array('th|thai', 'thai-utf-8', 'th', '&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;'),
'tr-iso-8859-9' => array('tr|turkish', 'turkish-iso-8859-9', 'tr', 'T&uuml;rk&ccedil;e'),
'tr-utf-8' => array('tr|turkish', 'turkish-utf-8', 'tr', 'T&uuml;rk&ccedil;e'),
'tt-iso-8859-9' => array('tt|tatarish', 'tatarish-iso-8859-9', 'tt', 'Tatar&ccedil;a'),
'tt-utf-8' => array('tt|tatarish', 'tatarish-utf-8', 'tt', 'Tatar&ccedil;a'),
'uk-win1251' => array('uk|ukrainian', 'ukrainian-windows-1251', 'uk', '&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;'),
'uk-utf-8' => array('uk|ukrainian', 'ukrainian-utf-8', 'uk', '&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;'),
'zhtw-big5' => array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-big5', 'zh-TW', '&#20013;&#25991;'),
'zhtw-utf-8' => array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-utf-8', 'zh-TW', '&#20013;&#25991;'),
'zh-gb2312' => array('zh|chinese simplified', 'chinese_simplified-gb2312', 'zh', '&#20013;&#25991;'),
'zh-utf-8' => array('zh|chinese simplified', 'chinese_simplified-utf-8', 'zh', '&#20013;&#25991;'),
);

View File

@@ -95,52 +95,25 @@ if ($server > 0) {
PMA_printListItem($strServer . ': ' . $server_info, 'li_server_info');
}
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && PMA_MYSQL_INT_VERSION < 40100) {
echo '<li id="li_select_mysql_charset">';
?>
<form method="post" action="index.php" target="_parent">
<input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<?php echo $strMySQLCharset;?>:
<select name="convcharset" xml:lang="en" dir="ltr"
onchange="this.form.submit();">
<?php
foreach ($cfg['AvailableCharsets'] as $tmpcharset) {
if ($convcharset == $tmpcharset) {
$selected = ' selected="selected"';
} else {
$selected = '';
}
echo ' '
. '<option value="' . $tmpcharset . '"' . $selected . '>' . $tmpcharset . '</option>' . "\n";
}
?>
</select>
<noscript><input type="submit" value="<?php echo $strGo;?>" /></noscript>
</form>
</li>
<?php
} elseif (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <li id="li_select_mysql_charset">';
echo ' ' . $strMySQLCharset . ': '
. ' <strong xml:lang="en" dir="ltr">'
. ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
. ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
. ' </strong>' . "\n"
. ' </li>' . "\n"
. ' <li id="li_select_mysql_collation">';
echo ' <form method="post" action="index.php" target="_parent">' . "\n"
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
. ' <label for="select_collation_connection">' . "\n"
. ' ' . $strMySQLConnectionCollation . ': ' . "\n"
. ' </label>' . "\n"
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true)
. ' <noscript><input type="submit" value="' . $strGo . '" /></noscript>' . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
. ' </form>' . "\n"
. ' </li>' . "\n";
}
echo ' <li id="li_select_mysql_charset">';
echo ' ' . $strMySQLCharset . ': '
. ' <strong xml:lang="en" dir="ltr">'
. ' ' . $mysql_charsets_descriptions[$mysql_charset_map[strtolower($charset)]] . "\n"
. ' (' . $mysql_charset_map[strtolower($charset)] . ')' . "\n"
. ' </strong>' . "\n"
. ' </li>' . "\n"
. ' <li id="li_select_mysql_collation">';
echo ' <form method="post" action="index.php" target="_parent">' . "\n"
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
. ' <label for="select_collation_connection">' . "\n"
. ' ' . $strMySQLConnectionCollation . ': ' . "\n"
. ' </label>' . "\n"
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true)
. ' <noscript><input type="submit" value="' . $strGo . '" /></noscript>' . "\n"
// put the doc link in the form so that it appears on the same line
. PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . "\n"
. ' </form>' . "\n"
. ' </li>' . "\n";
if ($cfg['ShowCreateDb']) {
echo '<li id="li_create_database">';