Commit 78ab6228 authored by mso's avatar mso

Version 0.6.2 - 2009-02-14

git-svn-id: svn+ssh://85.214.81.201/srv/svn/repos/idna_convert/trunk@3158 35e3bc58-21ef-11dd-9788-dfbd14258a26
parent 6132eabe
......@@ -62,13 +62,13 @@ input { font-size:8pt;font-family:Verdana, Helvetica, Sans-Serif; }
Stellen Sie aber sicher, dass Ihr Browser den Zeichensatz <strong>UTF-8</strong> unterstützt.<br />
<br />
Wenn Sie Interesse an der zugrundeliegenden PHP-Klasse haben, können Sie diese
<a href="http://phlymail.de/de/downloads/idna/download/">hier herunterladen</a>.<br />
<a href="http://phlymail.com/de/downloads/idna/download/">hier herunterladen</a>.<br />
<br />
Diese Klasse wird ohne Garantie ihrer Funktionstüchtigkeit bereit gestellt. Nutzung auf eigene Gefahr.<br />
Um sicher zu stellen, dass eine Zeichenkette korrekt umgewandelt wurde, sollten Sie diese immer zurückwandeln
und das Ergebnis mit Ihrer ursprünglichen Eingabe vergleichen.<br />
<br />
Fehler und Probleme können Sie gern an <a href="mailto:team@phlymail.de">team@phlymail.de</a> senden.<br />
Fehler und Probleme können Sie gern an <a href="mailto:team@phlymail.com">team@phlymail.com</a> senden.<br />
<?php } else { ?>
This converter allows you to transfer domain names between the encoded (Punycode) notation
and the decoded (UTF-8) notation.<br />
......@@ -79,13 +79,13 @@ input { font-size:8pt;font-family:Verdana, Helvetica, Sans-Serif; }
Make sure, that your browser is capable of the <strong>UTF-8</strong> character encoding.<br />
<br />
For those of you interested in the PHP source of the underlying class, you might
<a href="http://phlymail.de/en/downloads/idna/download/">download it here</a>.<br />
<a href="http://phlymail.com/en/downloads/idna/download/">download it here</a>.<br />
<br />
Please be aware, that this class is provided as is and without any liability. Use at your own risk.<br />
To ensure, that a certain string has been converted correctly, you should convert it both ways and compare the
results.<br />
<br />
Please feel free to report bugs and problems to: <a href="mailto:team@phlymail.de">team@phlymail.de</a>.<br />
Please feel free to report bugs and problems to: <a href="mailto:team@phlymail.com">team@phlymail.com</a>.<br />
<?php } ?>
<br />
</div>
......@@ -109,7 +109,7 @@ input { font-size:8pt;font-family:Verdana, Helvetica, Sans-Serif; }
</td>
</tr>
</table><br />
<span id="copy">Version used: 0.6.0; (c) <a href="http://phlylabs.de">phlyLabs</a> 2004-2008</span>
<span id="copy">Version used: 0.6.2; (c) <a href="http://phlylabs.de">phlyLabs</a> 2004-2009</span>
</div>
</td>
</tr>
......
......@@ -48,10 +48,9 @@
*
* @author Matthias Sommerfeld <mso@phlylabs.de>
* @author Leonid Kogan <lko@neuse.de>
* @copyright 2004-2008 phlyLabs Berlin, http://phlylabs.de
* @version 0.6.0
* @copyright 2004-2009 phlyLabs Berlin, http://phlylabs.de
* @version 0.6.2
* @changelog since 0.5.1 class updated to PHP5/6 style should be compatible to PHP 4.3+
*
*/
class idna_convert
{
......@@ -764,7 +763,12 @@ class idna_convert
{
$output = array();
$out_len = 0;
$inp_len = strlen($input);
// Patch by Daniel Hahler; work around prolbem with mbstring.func_overload
if (function_exists('mb_strlen')) {
$inp_len = mb_strlen($input, '8bit');
} else {
$inp_len = strlen($input);
}
$mode = 'next';
$test = 'none';
for ($k = 0; $k < $inp_len; ++$k) {
......@@ -840,7 +844,7 @@ class idna_convert
private function _ucs4_to_utf8($input)
{
$output = '';
foreach ($input as $v) {
foreach ($input as $k => $v) {
if ($v < 128) { // 7bit are transferred literally
$output .= chr($v);
} elseif ($v < (1 << 11)) { // 2 bytes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment