This repository was archived by the owner on Jan 14, 2019. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathunicode.html
More file actions
executable file
·61 lines (60 loc) · 2.17 KB
/
Copy pathunicode.html
File metadata and controls
executable file
·61 lines (60 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>HTML Coder</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Vlad Podvorny" />
<style>
* {padding:0; margin:0;}
body {font:10pt verdana,arial,sans-serif; background:#fff;}
h1 {font:14pt verdana,arial,sans-serif; color:#666; padding:0.2em;}
p {padding:2px 0;}
button {border:1px solid #333; font:9pt arial,sans-serif;}
.small {font:normal 8pt arial,sans-serif; line-height:1.1;}
.big {font:bold 16pt verdana,arial,sans-serif; color:#03c;}
span.small {color:#000;}
a.small {color:#00f;}
a.small:hover {color:#f00;}
div.main {margin:4px 8px;}
#result {padding:1em; font:9pt arial,sans-serif; background:#dcdcdc; border:1px solid #666;}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
function text2entities(sIn, bNonAsciiOnly) {
var b=[];
for(var i=0; i<sIn.length; i++) {
var cc=sIn.charCodeAt(i), c=(bNonAsciiOnly && cc>127)? '&#'+cc+';':sIn.charAt(i);
b.push(c);
}
return b.join('');
}
//--><!]]></script>
</head>
<body>
<div class="main">
<script type="text/javascript"><!--//--><![CDATA[//><!--
if (top.location.href!=self.location.href) {
document.write('<p><a class="small" href="javascript:top.location.href=self.location.href;">remove frames</a></p>');
}
//--><!]]></script>
<h1>Convert text to Unicode entities.</h1>
<form onsubmit="return false">
<div onclick="clearOutput()">
<p>
<input type="radio" name="mode" value="" checked="checked" />Non-ASCII only<br/>
<input type="radio" name="mode" value="1" />Non-ASCII only<br/>
<input type="checkbox" name="literals" /> Use literals rather than numbers
</p>
<p>Enter text:</p>
<textarea name="textIn" rows="8" cols="80" onfocus="this.select()"></textarea>
</div>
<p><button onclick="doTheJob()">Encode</button></p>
<div id="divOut" style="display:none;">
<p>Copy this (Ctrl-C):</p>
<textarea name="textOut" rows="8" cols="80"></textarea>
<p>Verify:</p>
<div id="result"></div>
</div>
</form>
</div>
</body>
</html>