[sword-svn] r292 - in trunk: . webapp webapp/WEB-INF/lib webapp/examples
scribe at www.crosswire.org
scribe at www.crosswire.org
Wed Sep 24 15:31:04 MST 2008
Author: scribe
Date: 2008-09-24 15:31:03 -0700 (Wed, 24 Sep 2008)
New Revision: 292
Added:
trunk/webapp/WEB-INF/lib/corba-utf8.jar
Modified:
trunk/README
trunk/webapp/bookdisplay.jsp
trunk/webapp/dailydevotion.jsp
trunk/webapp/examples/transtest.jsp
trunk/webapp/fetchdata.jsp
trunk/webapp/parallelstudy.jsp
trunk/webapp/passagestudy.jsp
trunk/webapp/versesnippet.jsp
trunk/webapp/wordsearchresults.jsp
Log:
Added CORBA override that defaults to UTF-8
Modified: trunk/README
===================================================================
--- trunk/README 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/README 2008-09-24 22:31:03 UTC (rev 292)
@@ -11,3 +11,12 @@
This could alternatively be located at /usr/etc/orbitrc, or
/usr/local/etc/orbitrc, depending on how ORBit has been configured
+
+
+CORBA UTF-8
+-----------------
+
+You may need to drop the webapp/WEB-INF/lib/corba-utf8.jar
+into $TOMCAT/endorsed and restart tomcat. This jar contains
+a patch to make corba default to UTF-8 if it can't determine
+encoding.
Added: trunk/webapp/WEB-INF/lib/corba-utf8.jar
===================================================================
(Binary files differ)
Property changes on: trunk/webapp/WEB-INF/lib/corba-utf8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/webapp/bookdisplay.jsp
===================================================================
--- trunk/webapp/bookdisplay.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/bookdisplay.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -54,10 +54,10 @@
// open our current entry in tree
if ((module != null) && (forceOpen)) {
module.setKeyText(gbsEntry);
- String tmp = new String(module.getKeyText().getBytes("iso8859-1"), "UTF-8");
+ String tmp = module.getKeyText();
while (tmp.length() > 0) {
bookTreeOpen.add(tmp);
- tmp = new String(module.getKeyParent().getBytes("iso8859-1"), "UTF-8");
+ tmp = module.getKeyParent();
}
}
@@ -133,7 +133,7 @@
String heading = null;
if (parent != null) {
module.setKeyText(parent);
- heading = new String(module.getRenderText().getBytes("iso8859-1"), "UTF-8");
+ heading = module.getRenderText();
String[] children = module.getKeyChildren();
// we better have children. We should have been one of them
if ((children != null) && (children.length > 0)) {
@@ -144,13 +144,13 @@
for (int i = 0; i < children.length; i++) {
String k = parent + "/" + children[i];
module.setKeyText(k);
- k = new String(module.getKeyText().getBytes("iso8859-1"), "UTF-8");
+ k = module.getKeyText();
boolean curVerse = (k.equals(new String(gbsEntry.getBytes("iso8859-1"), "UTF-8")));
String[] heads = module.getEntryAttribute("Heading", "Preverse", "0", true);
if (heads.length > 0) {
%>
<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= curVerse ? "currentverse" : "verse" %>">
- <h3><span class="verse"><%= new String(heads[0].getBytes("iso8859-1"), "UTF-8") %></span></h3></div></td></tr>
+ <h3><span class="verse"><%= heads[0] %></span></h3></div></td></tr>
<%
}
%>
@@ -161,7 +161,7 @@
%>
<td valign="top" align="right"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= curVerse ? "currentverse" : "verse" %>">
<span class="versenum"><a <%= (k.equals(gbsEntry))?"id=\"cv\"":"" %> href="bookdisplay.jsp?gbsEntry=<%= URLEncoder.encode(k)+"#cv" %>">
- <%= new String(children[i].getBytes("iso8859-1"), "UTF-8") %></a>
+ <%= children[i] %></a>
</span></div></td>
<%
}
@@ -175,7 +175,7 @@
mgr.setGlobalOption("Strong's Numbers", (strongs)?"On":"Off");
mgr.setGlobalOption("Morphological Tags", (morph)?"On":"Off");
%>
- <%= new String(module.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= module.getRenderText() %>
<%
// </div>
%>
@@ -185,7 +185,7 @@
%>
<td valign="top" align="right"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= curVerse ? "currentverse" : "verse" %>">
<span class="versenum"><a <%= (k.equals(gbsEntry))?"id=\"cv\"":"" %> href="bookdisplay.jsp?key=<%= URLEncoder.encode(k)+"#cv" %>">
- <%= new String(children[i].getBytes("iso8859-1"), "UTF-8") %></a>
+ <%= children[i] %></a>
</span></div></td>
<%
}
@@ -206,7 +206,7 @@
if (!printed) {
%>
<div <%= rtol ? "dir=\"rtl\"" : "" %> class="verse">
- <%= new String(module.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= module.getRenderText() %>
</div>
<%
}
@@ -236,7 +236,7 @@
int offset = rootTreeKey.lastIndexOf("/");
String[] children = module.getKeyChildren();
- boolean open = bookTreeOpen.contains(new String(rootTreeKey.getBytes("iso8859-1"), "UTF-8"));
+ boolean open = bookTreeOpen.contains(rootTreeKey);
boolean dig = (children.length > 0);
if (dig) {
if ("2".equals(module.getConfigEntry("DisplayLevel"))) {
@@ -252,7 +252,7 @@
}
if (rootTreeKey.length()>0) {
- String localName = new String(rootTreeKey.substring(offset+1).getBytes("iso8859-1"), "UTF-8");
+ String localName = rootTreeKey.substring(offset+1);
String linkRef = rootTreeKey;
if (target.equals(rootTreeKey))
out.print("<li id=\"current\">"); //the current entry in the navigation tree
@@ -260,13 +260,13 @@
out.print("<li>");
if (dig) {
- out.print("<a " + (rootTreeKey.equals(currentJumpNode)? "id=\"cur\"":"") + " class=\"" + ((open)?"closed":"open") + "\" href=\"bookdisplay.jsp?" + ((open)?"close":"open") + "=" + URLEncoder.encode(new String(rootTreeKey.getBytes("iso8859-1"), "UTF-8")) + "#cur\"><img src=\"images/" + ((open)?"minus":"plus") + ".png\" alt=\"action\"/></a>");
+ out.print("<a " + (rootTreeKey.equals(currentJumpNode)? "id=\"cur\"":"") + " class=\"" + ((open)?"closed":"open") + "\" href=\"bookdisplay.jsp?" + ((open)?"close":"open") + "=" + URLEncoder.encode(rootTreeKey) + "#cur\"><img src=\"images/" + ((open)?"minus":"plus") + ".png\" alt=\"action\"/></a>");
}
else if (children.length > 0) {
linkRef = rootTreeKey + "/" + children[0];
}
- out.print(" <a href=\"bookdisplay.jsp?gbsEntry=" + URLEncoder.encode(new String(linkRef.getBytes("iso8859-1"), "UTF-8")) + "#cv\">" + localName + "</a>");
+ out.print(" <a href=\"bookdisplay.jsp?gbsEntry=" + URLEncoder.encode(linkRef) + "#cv\">" + localName + "</a>");
out.print("</li>\n");
}
Modified: trunk/webapp/dailydevotion.jsp
===================================================================
--- trunk/webapp/dailydevotion.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/dailydevotion.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -51,7 +51,7 @@
"&") + " (" + activeDevo.getName() + ")" %></h3>
<div class="verse">
- <%= new String(activeDevo.getRenderText().getBytes("iso-8859-1"), "UTF-8") %>
+ <%= activeDevo.getRenderText() %>
</div>
</div>
</tiles:put>
Modified: trunk/webapp/examples/transtest.jsp
===================================================================
--- trunk/webapp/examples/transtest.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/examples/transtest.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -1,3 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<%@ page
+ language="java"
+ contentType="text/html;charset=utf-8"
+%>
+
<%@ taglib uri="/WEB-INF/lib/crosswire-i18n.tld" prefix="t" %>
<%
String lang = request.getParameter("lang");
Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/fetchdata.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -47,7 +47,7 @@
out.print("<dl>");
for (int j = 0; j < keys.length; j++) {
book.setKeyText(keys[j]);
- out.print("<dt><a href=\"passagestudy.jsp?key=" + URLEncoder.encode(new String(book.getKeyText().getBytes("iso8859-1"), "UTF-8"))+"#cv\">" + new String(book.getKeyText().getBytes("iso8859-1"), "UTF-8") + "</a></dt><dd>" + new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8")+"</dd>\n");
+ out.print("<dt><a href=\"passagestudy.jsp?key=" + URLEncoder.encode(book.getKeyText())+"#cv\">" + book.getKeyText() + "</a></dt><dd>" + book.getRenderText()+"</dd>\n");
}
out.print("</dl>");
}
@@ -64,7 +64,7 @@
}
else {
%>
- <%= new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= book.getRenderText() %>
<%
}
}
Modified: trunk/webapp/parallelstudy.jsp
===================================================================
--- trunk/webapp/parallelstudy.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/parallelstudy.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -315,7 +315,7 @@
for (int h = 0; h < heads.length; h++) {
%>
<h3>
- <%= new String(heads[h].getBytes("iso8859-1"), "UTF-8") %>
+ <%= heads[h] %>
</h3>
<%
}
@@ -329,7 +329,7 @@
// <span xml:lang="<%= (lang.equals("")) ? "en" : lang
%>
- <%= new String(mod.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= mod.getRenderText() %>
<%
// </span>
%>
Modified: trunk/webapp/passagestudy.jsp
===================================================================
--- trunk/webapp/passagestudy.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/passagestudy.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -251,7 +251,7 @@
%>
<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
<h3>
- <%= new String(heads[0].getBytes("iso8859-1"), "UTF-8") %>
+ <%= heads[0] %>
</h3></div></td></tr>
<%
}
@@ -275,7 +275,7 @@
String lang = activeModule.getConfigEntry("Lang");
// <div xml:lang="<%= (lang.equals("")) ? "en" : lang
%>
- <%= new String(activeModule.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= activeModule.getRenderText() %>
<%
// </div>
%>
@@ -302,7 +302,7 @@
%>
<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
<div class="lexiconentry"><p>
- <%= new String(lex.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= lex.getRenderText() %>
</p></div>
</div></td></tr>
<% } %>
@@ -314,7 +314,7 @@
%>
<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
<div class="lexiconentry"><p>
- <%= new String(lex.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= lex.getRenderText() %>
</p></div>
</div></td></tr>
<% }
@@ -330,7 +330,7 @@
%>
<div class="verse">
<span class="versenum"><%= activeKey %></span>
- <%= new String(activeModule.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= activeModule.getRenderText() %>
</div>
<%
}
Modified: trunk/webapp/versesnippet.jsp
===================================================================
--- trunk/webapp/versesnippet.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/versesnippet.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -20,7 +20,7 @@
book.setKeyText(key);
%>
<div>
- <%= new String(book.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
+ <%= book.getRenderText() %>
</div>
<%
}
Modified: trunk/webapp/wordsearchresults.jsp
===================================================================
--- trunk/webapp/wordsearchresults.jsp 2008-09-22 23:42:30 UTC (rev 291)
+++ trunk/webapp/wordsearchresults.jsp 2008-09-24 22:31:03 UTC (rev 292)
@@ -21,6 +21,7 @@
String resetSearchTerm = request.getParameter("searchTerm");
if (resetSearchTerm != null) {
+ resetSearchTerm = new String(resetSearchTerm.getBytes("iso8859-1"), "UTF-8") %>
mgr.setGlobalOption("Greek Accents", "Off");
session.setAttribute("ActiveSearchTerm", mgr.filterText("Greek Accents", resetSearchTerm));
mgr.setGlobalOption("Greek Accents", "On");
@@ -48,7 +49,7 @@
%>
<tiles:insert beanName="basic" flush="true" >
<tiles:put name="title" type="string">
- Search results for <%= new String(activeSearchTerm.getBytes("iso8859-1"), "UTF-8") %>
+ Search results for <%= activeSearchTerm %>
</tiles:put>
<tiles:put name="pintro" type="string" >
<div>
@@ -97,7 +98,7 @@
<tiles:put name="content" type="string">
<div id="searchresults">
- <h2><t:t>Results for</t:t> <em><%= new String(activeSearchTerm.getBytes("iso8859-1"), "UTF-8") %></em></h2>
+ <h2><t:t>Results for</t:t> <em><%= activeSearchTerm %></em></h2>
<%
SearchHit[] results = null;
if ((activeSearchTerm != null) && (activeSearchTerm.trim().length() > 0)) {
@@ -138,7 +139,7 @@
for (int i = resultStart.intValue(); i < results.length && i < resultStart.intValue() + resultLimit.intValue(); i++)
{
activeModule.setKeyText(results[i].key);
- String dispKey = new String(results[i].key.getBytes("iso-8859-1"), "UTF-8");
+ String dispKey = results[i].key;
%>
<dt>
<a href="<%= ("GBS".equals(lastModType))?"bookdisplay.jsp?gbsEntry=":"passagestudy.jsp?key=" %><%= URLEncoder.encode(dispKey)+"#cv" %>" title="<%= dispKey %>"><%= dispKey %></a>
@@ -146,7 +147,7 @@
</dt>
<% boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction"))); %>
<dd dir="<%= rtol ? "rtl" : "" %>">
- <%= new String(activeModule.getRenderText().getBytes("iso-8859-1"), "UTF-8") %>
+ <%= activeModule.getRenderText() %>
</dd>
<%
More information about the sword-cvs
mailing list