mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-4225 remove non-ascii characters from source.
X-SVN-Rev: 16841
This commit is contained in:
parent
83876dc112
commit
bf0be980df
8 changed files with 36 additions and 36 deletions
|
@ -101,7 +101,7 @@ public class GenerateCldrTests {
|
|||
//compareAvailable();
|
||||
//if (true) return;
|
||||
//System.out.println(createCaseClosure(new UnicodeSet("[a{bc}{def}{oss}]")));
|
||||
//System.out.println(createCaseClosure(new UnicodeSet("[a-zß{aa}]")));
|
||||
//System.out.println(createCaseClosure(new UnicodeSet("[a-z\u00c3\u0178{aa}]")));
|
||||
GenerateCldrTests t = new GenerateCldrTests();
|
||||
//t.generate(new ULocale("hu"), null);
|
||||
t.generate(options[MATCH].value);
|
||||
|
|
|
@ -207,7 +207,7 @@ public class GeneratePOSIX {
|
|||
{ "print", "[[:Whitespace:]-[[:Control:][:Format:][:Surrogate:][:Unassigned:]]]" },
|
||||
{ "punct", "[:Punctuation:]" },
|
||||
{ "digit", "[:Decimal_Number:]" },
|
||||
{ "xdigit", "[[:Decimal_Number:]a-f, A-F, �-f, A-F]" },
|
||||
{ "xdigit", "[[:Decimal_Number:]a-f, A-F, \uff21-\uff26, \uff41-\uff46]" },
|
||||
{ "blank", "[[:Whitespace:]-[\\u000A-\\u000D \\u0085 [:Line_Separator:][:Paragraph_Separator:]]]" } };
|
||||
// print character types, restricted to the charset
|
||||
int item, last;
|
||||
|
|
|
@ -1651,7 +1651,7 @@ public class GenerateSidewaysView {
|
|||
"Each value is listed under the field designator (in XML XPath format), " +
|
||||
"followed by all the locales that use it. " +
|
||||
"Locales are omitted if the value would be the same as the parent's. " +
|
||||
"The locales are listed in the format: ·aa· for searching. " +
|
||||
"The locales are listed in the format: \u00B7aa\u00B7 for searching. " +
|
||||
"The value appears in red if it is the same as the root. </p>");
|
||||
out.println("<table>");
|
||||
return out;
|
||||
|
@ -1679,7 +1679,7 @@ public class GenerateSidewaysView {
|
|||
out.println("<p>The following are charts for the individual datatypes, " +
|
||||
"that show a comparison across locales for different fields. " +
|
||||
"For example, in the orientation chart, one can see that all locales " +
|
||||
"are left-to-right except ·ar· ·fa· ·he· ·ps· (and their children).</p>" +
|
||||
"are left-to-right except \u00B7ar\u00B7 \u00B7fa\u00B7 \u00B7he\u00B7 \u00B7ps\u00B7 (and their children).</p>" +
|
||||
"<p>Note: these charts do not yet include collations</p>");
|
||||
out.println("<ul>");
|
||||
for(Iterator e = allTypes.iterator();e.hasNext();) {
|
||||
|
@ -1982,7 +1982,7 @@ public class GenerateSidewaysView {
|
|||
.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
|
||||
result.setFeature("http://xml.org/sax/features/validation", validating);
|
||||
} catch (SAXException e2) {
|
||||
try { // Ælfred
|
||||
try { // AElfred
|
||||
result = XMLReaderFactory
|
||||
.createXMLReader("gnu.xml.aelfred2.XmlReader");
|
||||
result.setFeature("http://xml.org/sax/features/validation", validating);
|
||||
|
|
|
@ -3569,7 +3569,7 @@ public class LDML2ICUConverter {
|
|||
|
||||
String treeName = LDMLUtilities.getAttributeValue(node, "type");
|
||||
// System.out.println("TreeName = " + treeName);
|
||||
boolean parseDraft = !writeDraft; // parse for draft status?
|
||||
boolean parseDraft = !writeDraft; // parse for draft status?
|
||||
boolean parseSubLocale = treeName.equals("collation");
|
||||
boolean parseThem = (parseDraft||parseSubLocale); // parse a bunch of locales?
|
||||
if(treeName.equals(myTreeName)) {
|
||||
|
|
|
@ -66,9 +66,9 @@ public class LDMLUtilities {
|
|||
public static Document getFullyResolvedLDML(String sourceDir, String locale,
|
||||
boolean ignoreRoot, boolean ignoreUnavailable,
|
||||
boolean ignoreIfNoneAvailable){
|
||||
Document full =null;
|
||||
Document full =null;
|
||||
try{
|
||||
full = parse(sourceDir+File.separator+ "root.xml", ignoreRoot);
|
||||
full = parse(sourceDir+File.separator+ "root.xml", ignoreRoot);
|
||||
if(full!=null){
|
||||
full = resolveAliases(full, sourceDir, "root");
|
||||
}
|
||||
|
@ -81,8 +81,8 @@ public class LDMLUtilities {
|
|||
}*/
|
||||
|
||||
}catch(RuntimeException ex){
|
||||
if(!ignoreRoot){
|
||||
throw ex;
|
||||
if(!ignoreRoot){
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
int index = locale.indexOf(".xml");
|
||||
|
@ -100,7 +100,7 @@ public class LDMLUtilities {
|
|||
if(loc==null){
|
||||
loc = constituents[i];
|
||||
}else{
|
||||
loc = loc +"_"+ constituents[i];
|
||||
loc = loc +"_"+ constituents[i];
|
||||
}
|
||||
Document doc = null;
|
||||
|
||||
|
@ -419,11 +419,11 @@ public class LDMLUtilities {
|
|||
*/
|
||||
private static Node mergeLDMLDocuments(Document source, Node override, StringBuffer xpath,
|
||||
String thisName, String sourceDir){
|
||||
if(source==null){
|
||||
return override;
|
||||
if(source==null){
|
||||
return override;
|
||||
}
|
||||
if(xpath.length()==0){
|
||||
xpath.append("/");
|
||||
xpath.append("/");
|
||||
}
|
||||
|
||||
// boolean gotcha = false;
|
||||
|
@ -464,8 +464,8 @@ public class LDMLUtilities {
|
|||
|
||||
Node parentNodeInSource = null;
|
||||
if(nodeInSource==null){
|
||||
// the child xml has a new node
|
||||
// that should be added to parent
|
||||
// the child xml has a new node
|
||||
// that should be added to parent
|
||||
String parentXpath = xpath.substring(0, savedLength);
|
||||
|
||||
if(childName.indexOf(":")>-1){
|
||||
|
@ -474,7 +474,7 @@ public class LDMLUtilities {
|
|||
parentNodeInSource = getNode(source,parentXpath);
|
||||
}
|
||||
if(parentNodeInSource==null){
|
||||
throw new RuntimeException("Internal Error");
|
||||
throw new RuntimeException("Internal Error");
|
||||
}
|
||||
|
||||
Node childToImport = source.importNode(child,true);
|
||||
|
@ -495,7 +495,7 @@ public class LDMLUtilities {
|
|||
//recurse to pickup any children!
|
||||
mergeLDMLDocuments(source, child, xpath, thisName, sourceDir);
|
||||
}else{
|
||||
// we have reached a leaf node now get the
|
||||
// we have reached a leaf node now get the
|
||||
// replace to the source doc
|
||||
parentNodeInSource = nodeInSource.getParentNode();
|
||||
Node childToImport = source.importNode(child,true);
|
||||
|
@ -732,7 +732,7 @@ public class LDMLUtilities {
|
|||
}
|
||||
public static void appendXPathAttribute(Node node, StringBuffer xpath,boolean ignoreAlt){
|
||||
boolean terminate = false;
|
||||
String val = getAttributeValue(node, LDMLConstants.TYPE);
|
||||
String val = getAttributeValue(node, LDMLConstants.TYPE);
|
||||
String and = "and";
|
||||
boolean isStart = true;
|
||||
String name = node.getNodeName();
|
||||
|
@ -741,7 +741,7 @@ public class LDMLUtilities {
|
|||
xpath.append("[");
|
||||
isStart=false;
|
||||
}
|
||||
xpath.append("@type='");
|
||||
xpath.append("@type='");
|
||||
xpath.append(val);
|
||||
xpath.append("'");
|
||||
terminate = true;
|
||||
|
@ -788,7 +788,7 @@ public class LDMLUtilities {
|
|||
terminate = true;
|
||||
}
|
||||
if(terminate){
|
||||
xpath.append("]");
|
||||
xpath.append("]");
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -1449,7 +1449,7 @@ System.err.println(filename2 + ":" + e.getLineNumber() + (col>=0?":" + col:"")
|
|||
return str;
|
||||
}
|
||||
|
||||
// This should be in ULocale!
|
||||
// This should be in ULocale!
|
||||
public static String getParent(String locale) {
|
||||
int pos = locale.lastIndexOf('_');
|
||||
if (pos >= 0) {
|
||||
|
|
|
@ -327,18 +327,18 @@ public class GatherAPIData {
|
|||
class Result {
|
||||
int res = -1;
|
||||
void set(int val) {
|
||||
if (res != -1) {
|
||||
if (val == APIInfo.STA_DEPRECATED) {
|
||||
// ok to have both a 'standard' tag and deprecated
|
||||
return;
|
||||
} else if (res != APIInfo.STA_DEPRECATED) {
|
||||
// if already not deprecated, this is an error
|
||||
throw new RuntimeException("bad doc: " + doc + " old: " + res + " new: " + val);
|
||||
}
|
||||
}
|
||||
// ok to replace with new tag
|
||||
res = val;
|
||||
}
|
||||
if (res != -1) {
|
||||
if (val == APIInfo.STA_DEPRECATED) {
|
||||
// ok to have both a 'standard' tag and deprecated
|
||||
return;
|
||||
} else if (res != APIInfo.STA_DEPRECATED) {
|
||||
// if already not deprecated, this is an error
|
||||
throw new RuntimeException("bad doc: " + doc + " old: " + res + " new: " + val);
|
||||
}
|
||||
}
|
||||
// ok to replace with new tag
|
||||
res = val;
|
||||
}
|
||||
int get() {
|
||||
if (res == -1) {
|
||||
System.err.println("warning: no tag for " + doc);
|
||||
|
|
|
@ -43,7 +43,7 @@ final class CurrencyServiceShim extends Currency.ServiceShim {
|
|||
return Currency.createCurrency(loc);
|
||||
}
|
||||
ULocale[] actualLoc = new ULocale[1];
|
||||
Currency curr = (Currency)service.get(loc, actualLoc);
|
||||
Currency curr = (Currency)service.get(loc, actualLoc);
|
||||
ULocale uloc = actualLoc[0];
|
||||
curr.setLocale(uloc, uloc); // services make no distinction between actual & valid
|
||||
return curr;
|
||||
|
|
|
@ -121,7 +121,7 @@ import java.lang.IllegalArgumentException;
|
|||
*
|
||||
* <tr>
|
||||
* <td>1 sec</td>
|
||||
* <td align="right">5.84542×10¹¹</td>
|
||||
* <td align="right">5.84542×10¹¹</td>
|
||||
* <td align="right">285,420,920.94</td>
|
||||
* <td align="right">136.10</td>
|
||||
* </tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue