Skip to content

Commit

Permalink
Annoying bug 'xxx charset not supported' which made
Browse files Browse the repository at this point in the history
Croatian, Hungarian, Polish, Romanian, Korean, Latvian,
Lithuanian, Slovene and Czech translations unusable is now fixed. Just one char.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4203 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Alexey Chumakov committed Sep 30, 2006
1 parent f66eb64 commit 6c16a0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/string_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: string_api.php,v 1.82 2006-07-05 03:14:07 thraxisp Exp $
# $Id: string_api.php,v 1.83 2006-09-30 22:23:57 achumakov Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -695,7 +695,10 @@ function string_html_entities( $p_string ) {
# the current charset, if the current PHP version supports it.
function string_html_specialchars( $p_string ) {
if ( php_version_at_least( '4.1.0' ) ) {
return htmlspecialchars( $p_string, ENT_COMPAT, lang_get( 'charset' ) );
# achumakov: @ added to avoid warning output in unsupported codepages
# e.g. 8859-2, windows-1257, Korean, which are treated as 8859-1.
# This is VERY important for Eastern European, Baltic and Korean languages
return @htmlspecialchars( $p_string, ENT_COMPAT, lang_get( 'charset' ) );
} else {
return htmlspecialchars( $p_string );
}
Expand Down

0 comments on commit 6c16a0d

Please sign in to comment.