Added non-breaking space to wylie.
This commit is contained in:
parent
6c19b1e0b9
commit
ea46ddebb0
2 changed files with 37 additions and 33 deletions
|
@ -26,7 +26,7 @@ public class Manipulate
|
|||
{
|
||||
private static String endOfParagraphMarks = "/;|!:^@#$%=,";
|
||||
private static String bracketMarks = "<>(){}[]";
|
||||
private static String endOfSyllableMarks = " _\t";
|
||||
private static String endOfSyllableMarks = " _\t\u00A0";
|
||||
private static String allStopMarkers = endOfSyllableMarks + endOfParagraphMarks + bracketMarks;
|
||||
private static final int TIBETAN_UNICODE_RANGE[] = {3840, 4095};
|
||||
private static String JSON_ESCAPABLES = "\"\\/";
|
||||
|
|
|
@ -18,7 +18,6 @@ Contributor(s): ______________________________________.
|
|||
package org.thdl.tib.scanner;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
|
@ -147,14 +146,18 @@ public class RemoteScannerFilter extends GenericServlet
|
|||
break;
|
||||
case JSON:
|
||||
linea = req.getParameter("text");
|
||||
if (linea!=null)
|
||||
{
|
||||
linea = Manipulate.NCR2UnicodeString(linea);
|
||||
if (Manipulate.guessIfUnicode(linea)) linea = BasicTibetanTranscriptionConverter.unicodeToWylie(linea);
|
||||
else if (Manipulate.guessIfAcip(linea)) linea = BasicTibetanTranscriptionConverter.acipToWylie(linea);
|
||||
scanner.scanLine(linea);
|
||||
}
|
||||
}
|
||||
scanner.finishUp();
|
||||
words = scanner.getWordArray();
|
||||
|
||||
if (words!=null)
|
||||
{
|
||||
for (i=0; i<words.length; i++)
|
||||
{
|
||||
linea = words[i].getDef();
|
||||
|
@ -185,11 +188,12 @@ public class RemoteScannerFilter extends GenericServlet
|
|||
if (i<words.length-1) out.println(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (format==JSON) out.println("}});");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
sl.writeLog("1\t2\t" + word.getWylie());
|
||||
if (word!=null) sl.writeLog("1\t2\t" + word.getWylie());
|
||||
sl.writeException(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue