[sword-svn] r384 - trunk/webapp/examples
scribe at crosswire.org
scribe at crosswire.org
Tue Nov 2 10:37:48 MST 2010
Author: scribe
Date: 2010-11-02 10:37:48 -0700 (Tue, 02 Nov 2010)
New Revision: 384
Modified:
trunk/webapp/examples/lookup.jsp
trunk/webapp/examples/parsevs.jsp
trunk/webapp/examples/rss.jsp
trunk/webapp/examples/search.jsp
trunk/webapp/examples/suggest.jsp
Log:
Updated examples to remove iso conversion workaround for bad Corba UTF8 crap.
Now that we use omniorb and also have a workout for orbit, the client workaround
is no longer necessary
Modified: trunk/webapp/examples/lookup.jsp
===================================================================
--- trunk/webapp/examples/lookup.jsp 2010-07-29 08:07:21 UTC (rev 383)
+++ trunk/webapp/examples/lookup.jsp 2010-11-02 17:37:48 UTC (rev 384)
@@ -21,7 +21,7 @@
book.setKeyText("jn3:16");
%>
<p>The <%= book.getDescription() %>'s entry for <%= book.getKeyText() %> is:</p>
-<p><%= new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8") %></p>
+<p><%= book.getRenderText() %></p>
</body>
Modified: trunk/webapp/examples/parsevs.jsp
===================================================================
--- trunk/webapp/examples/parsevs.jsp 2010-07-29 08:07:21 UTC (rev 383)
+++ trunk/webapp/examples/parsevs.jsp 2010-11-02 17:37:48 UTC (rev 384)
@@ -67,11 +67,6 @@
int runCommand(String command[], Writer result, boolean html, boolean canonize) {
int retVal = -1;
try {
-//result.write("running command:");
-//for (int i = 0; i < command.length; i++)
-// result.write("["+command[i]+"]");
-//result.flush();
-//return 0;
java.lang.Process p = Runtime.getRuntime().exec(command);
InputStream is = p.getInputStream();
@@ -80,7 +75,6 @@
String line;
while ((line = input.readLine()) != null) {
-// line = new String(line.getBytes("UTF-8"), "iso8859-1");
if (canonize) {
line = org.crosswire.utils.HTTPUtils.canonize(line);
}
Modified: trunk/webapp/examples/rss.jsp
===================================================================
--- trunk/webapp/examples/rss.jsp 2010-07-29 08:07:21 UTC (rev 383)
+++ trunk/webapp/examples/rss.jsp 2010-11-02 17:37:48 UTC (rev 384)
@@ -37,7 +37,7 @@
<description>Devotion of The Day</description>
<link> http://crosswire.org/study/dailydevotion.jsp?mod=losung_en_99 </link>
<content:encoded>
- <![CDATA[<img src="http://crosswire.org/images/crosssquare.png"/> <%= new String(book.getRenderText().getBytes("iso-8859-1"), "UTF-8") %> ]]>
+ <![CDATA[<img src="http://crosswire.org/images/crosssquare.png"/> <%= book.getRenderText() %> ]]>
</content:encoded>
<dc:rights>Powered by CrossWire.org</dc:rights>
<dc:date> <%= new Date() %> </dc:date>
Modified: trunk/webapp/examples/search.jsp
===================================================================
--- trunk/webapp/examples/search.jsp 2010-07-29 08:07:21 UTC (rev 383)
+++ trunk/webapp/examples/search.jsp 2010-11-02 17:37:48 UTC (rev 384)
@@ -35,7 +35,7 @@
book.setKeyText(results[i].key);
%>
-<tr><td><%= book.getKeyText() %></td><td><%= new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8") %></td></tr>
+<tr><td><%= book.getKeyText() %></td><td><%= book.getRenderText() %></td></tr>
<%
}
Modified: trunk/webapp/examples/suggest.jsp
===================================================================
--- trunk/webapp/examples/suggest.jsp 2010-07-29 08:07:21 UTC (rev 383)
+++ trunk/webapp/examples/suggest.jsp 2010-11-02 17:37:48 UTC (rev 384)
@@ -20,7 +20,7 @@
book.previous();
}
for (int i = 0; ((i < 20) && (book.error() == 0)); i++) {
- key = new String(book.getKeyText().getBytes("iso8859-1"), "UTF-8");
+ key = book.getKeyText();
retVal += (currentKey.equals(key)) ? "<li style=\"display: block; background: #C3AB7F;\">" : "<li style=\"display: block;\">";
retVal += "<a href=\"#\" onclick=\"suggest('"+mod+"', encodeURIComponent('"+key+"')); return false;\">"+key+"</a></li>\n";
@@ -36,8 +36,8 @@
if (book != null) {
System.err.println("setting: ["+key+"]");
book.setKeyText(key);
- String body = new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8");
- String keyText = new String(book.getKeyText().getBytes("iso8859-1"), "UTF-8");
+ String body = book.getRenderText();
+ String keyText = book.getKeyText();
System.err.println("getting: ["+keyText+"]");
out.print("<h2>"+keyText+"</h2>"+body);
}
More information about the sword-cvs
mailing list