-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language verify question #3632
Comments
No, it are no bugs. While changing (upload or transport) likely some white spaces were added just in front of starting php line eg. .... <php (points are blank) OR after closing tag. |
Perfect for the language pack and only for windows under this error. |
I suppose it is the Hungarian latest lang pack you are referring to. @Moc can you please have a look into the Hungarian lang pack too ? |
Two issues:
EDIT: I might be wrong about my conclusion on issue 2. Looking into it... |
@CaMer0n Can you take a look at this please? Test code: <?php
function is_utf8($str) {
/*
* @see http://hsivonen.iki.fi/php-utf8/ validation.php
*/
if(strtolower('CHARSET') != "utf-8" || $str == "")
{
return TRUE;
}
return (preg_match('/^.{1}/us',$str,$ar) == 1);
}
$strings = array(
"Főadminisztrátor",
"Hői",
"Rendszerinformáció",
"Felhasználó",
"Regisztrált felhasználó");
echo "Test 1: mb_check_encoding() <br />";
foreach($strings as $string)
{
if(mb_check_encoding($string, "UTF-8") == false)
{
echo "Error: ".$string." is NOT UTF-8 <br />";
}
else
{
echo "Success: ".$string." is UTF-8 <br />";
}
}
echo "<br /><br />";
echo "Test 2: is_utf8() - e107 method <br />";
foreach($strings as $string)
{
if(!is_utf8($string))
{
echo "Error: ".$string." is NOT UTF-8 <br />";
}
else
{
echo "Success: ".$string." is UTF-8 <br />";
}
} All test |
@SimSync Maybe you have an idea on this one? |
@CaMer0n @Moc On line 1926 (lancheck.php), the string from the language file get's malformed for some reason. Edit: I think i found the issue... There was a missing unicode flag in the regex to match the defines. Edit: It is working for me. PR submitted |
missed the "u" (unicode) flag. Due to that, some utf-8 values were malformed during processing.
Solved problem! |
Just to confirm it does work here too 👍 (all (81) errors are gone.. (Hungarian) |
Fixes #3632: Lancheck failed on some utf-8 values
@CaMer0n Could you provide the test class for lancheck.php? I will add than the tests |
@SimSync Done! |
Verify my language pack in localhost (windows 10 and xampp).
This is bug?
All errors: Non UTF-8 Characters Found
The text was updated successfully, but these errors were encountered: