Created
October 9, 2016 03:06
-
-
Save acgrid/1f5f95a3f274227810210ac17d20ed3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh-cn" dir="ltr"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>SHIFTJIS</title></head> | |
<body> | |
<p><?php | |
if(isset($_POST['subject'])){ | |
$s = $_POST['subject']; | |
if(!empty($s)){ | |
echo iconv("SHIFT_JIS", "UTF-8", iconv('UTF-8', 'GBK', $s)); | |
} | |
}else{ | |
$s = ''; | |
} | |
?></p> | |
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> | |
SJIS: <textarea name="subject" style="width: 100%; height: 300px"><?php echo htmlspecialchars($s) ?></textarea><br /> | |
<input type="submit" value="Convert" /> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment