Warnings were not being detected correctly. Fixed.
ACIP->Unicode uses U+0020, ' ', for whitespace. ACIP->TMW uses the TMW whitespace for whitespace.
This commit is contained in:
parent
01e65176d4
commit
8664571577
2 changed files with 16 additions and 18 deletions
|
@ -367,9 +367,8 @@ public class ACIPConverter {
|
||||||
tdocLocation[0] += text.length();
|
tdocLocation[0] += text.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (null != hasWarnings) hasWarnings[0] = true;
|
||||||
if (null != warnings) {
|
if (null != warnings) {
|
||||||
if (null != hasWarnings) hasWarnings[0] = true;
|
|
||||||
warnings.append("Warning: Lexical warning: ");
|
warnings.append("Warning: Lexical warning: ");
|
||||||
warnings.append(s.getText());
|
warnings.append(s.getText());
|
||||||
warnings.append('\n');
|
warnings.append('\n');
|
||||||
|
@ -488,8 +487,8 @@ public class ACIPConverter {
|
||||||
tdocLocation[0] += text.length();
|
tdocLocation[0] += text.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (null != hasWarnings) hasWarnings[0] = true;
|
||||||
if (null != warnings) {
|
if (null != warnings) {
|
||||||
if (null != hasWarnings) hasWarnings[0] = true;
|
|
||||||
warnings.append(warning);
|
warnings.append(warning);
|
||||||
warnings.append('\n');
|
warnings.append('\n');
|
||||||
}
|
}
|
||||||
|
@ -563,16 +562,15 @@ public class ACIPConverter {
|
||||||
// one) and then a comma:
|
// one) and then a comma:
|
||||||
peekaheadFindsSpacesAndComma(scan, i+1))) {
|
peekaheadFindsSpacesAndComma(scan, i+1))) {
|
||||||
if (null != writer) {
|
if (null != writer) {
|
||||||
unicode = " ";
|
unicode = " "; // DLC NOW FIXME: allow for U+00A0 between two <i>shad</i>s (0F0D or 0F0E), and optionally insert a U+200B after the <i>shad</i> following the whitespace so that stupid software will break lines more nicely
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
if (null != tdoc) {
|
if (null != tdoc) {
|
||||||
String x = " ";
|
DuffCode spaceDuff = TibetanMachineWeb.getGlyph("_");
|
||||||
tdoc.appendRoman(tdocLocation[0],
|
if (null == spaceDuff) throw new Error("whitespace duff");
|
||||||
x,
|
tdoc.appendDuffCode(tdocLocation[0]++,
|
||||||
Color.BLACK);
|
spaceDuff, Color.BLACK);
|
||||||
tdocLocation[0] += x.length();
|
continue; // FIXME: if null != writer, output was just dropped.
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (s.getText().equals(",")
|
} else if (s.getText().equals(",")
|
||||||
|
|
|
@ -7425,7 +7425,7 @@ M+NA
|
||||||
uhelp("^\rGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
uhelp("^\rGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
||||||
uhelp("^\r\nGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
uhelp("^\r\nGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
||||||
uhelp("^\nGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
uhelp("^\nGONG SA", "\u0f38\u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
||||||
uhelp("^ GONG SA", "[#ERROR CONVERTING ACIP DOCUMENT: Lexical error: The ACIP {^} must precede a tsheg bar.] \u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
uhelp("^ GONG SA", "[#ERROR CONVERTING ACIP DOCUMENT: Lexical error: The ACIP {^} must precede a tsheg bar.] \u0f42\u0f7c\u0f44\u0f0b\u0f66");
|
||||||
uhelp("BGLA", "\u0f56\u0f42\u0fb3");
|
uhelp("BGLA", "\u0f56\u0f42\u0fb3");
|
||||||
uhelp("BLCAG", "\u0f56\u0f63\u0f95\u0f42");
|
uhelp("BLCAG", "\u0f56\u0f63\u0f95\u0f42");
|
||||||
uhelp("DBA", "[#WARNING CONVERTING ACIP DOCUMENT: The ACIP DBA has been interpreted as two stacks, not one, but you may wish to confirm that the original text had two stacks as it would be an easy mistake to make to see one stack and forget to input it with '+' characters.]\u0f51\u0f56");
|
uhelp("DBA", "[#WARNING CONVERTING ACIP DOCUMENT: The ACIP DBA has been interpreted as two stacks, not one, but you may wish to confirm that the original text had two stacks as it would be an easy mistake to make to see one stack and forget to input it with '+' characters.]\u0f51\u0f56");
|
||||||
|
@ -7526,18 +7526,18 @@ M+NA
|
||||||
"\u0f04\u0f05\u0f04\u0f05\u0f05\u0f67\u0f74\u0f7e\u0f7f\u0f0b\u0f42\u0fa2\u0f7d\u0f0b\u0f42\u0fb2\u0f7c\u0f08\u0f11\u0f0c\u0f0d");
|
"\u0f04\u0f05\u0f04\u0f05\u0f05\u0f67\u0f74\u0f7e\u0f7f\u0f0b\u0f42\u0fa2\u0f7d\u0f0b\u0f42\u0fb2\u0f7c\u0f08\u0f11\u0f0c\u0f0d");
|
||||||
uhelp("*#HUm: K+DHA GRO`;.,",
|
uhelp("*#HUm: K+DHA GRO`;.,",
|
||||||
"\u0f04\u0f05\u0f04\u0f05\u0f05\u0f67\u0f74\u0f7e\u0f7f\u0f0b\u0f40\u0fa2\u0f0b\u0f42\u0fb2\u0f7c\u0f08\u0f11\u0f0c\u0f0d");
|
"\u0f04\u0f05\u0f04\u0f05\u0f05\u0f67\u0f74\u0f7e\u0f7f\u0f0b\u0f40\u0fa2\u0f0b\u0f42\u0fb2\u0f7c\u0f08\u0f11\u0f0c\u0f0d");
|
||||||
uhelp("HA,\nHA\n\nHA", "\u0f67\u0f0d \u0f67\u0f0b\n\n\u0f67");
|
uhelp("HA,\nHA\n\nHA", "\u0f67\u0f0d \u0f67\u0f0b\n\n\u0f67");
|
||||||
uhelp("NGA,", "\u0f44\u0f0c\u0f0d");
|
uhelp("NGA,", "\u0f44\u0f0c\u0f0d");
|
||||||
uhelp("NGA,\nHA\n\nHA", "\u0f44\u0f0c\u0f0d \u0f67\u0f0b\n\n\u0f67");
|
uhelp("NGA,\nHA\n\nHA", "\u0f44\u0f0c\u0f0d \u0f67\u0f0b\n\n\u0f67");
|
||||||
uhelp("MDO,\n\nKA\n\nHA", "\u0f58\u0f51\u0f7c\u0f0d\n\n\u0f40\u0f0b\n\n\u0f67");
|
uhelp("MDO,\n\nKA\n\nHA", "\u0f58\u0f51\u0f7c\u0f0d\n\n\u0f40\u0f0b\n\n\u0f67");
|
||||||
uhelp("GA ,HA", "\u0f42 \u0f0d\u0f67");
|
uhelp("GA ,HA", "\u0f42 \u0f0d\u0f67");
|
||||||
uhelp("GA ,HA", "\u0f42 \u0f0d\u0f67");
|
uhelp("GA ,HA", "\u0f42 \u0f0d\u0f67");
|
||||||
uhelp("GU ,HA", "\u0f42\u0f74\u0f0b\u0f0d\u0f67");
|
uhelp("GU ,HA", "\u0f42\u0f74\u0f0b\u0f0d\u0f67");
|
||||||
uhelp("MA ,HA", "\u0f58\u0f0b\u0f0d\u0f67");
|
uhelp("MA ,HA", "\u0f58\u0f0b\u0f0d\u0f67");
|
||||||
uhelp("GA HA", "\u0f42\u0f0b\u0f67");
|
uhelp("GA HA", "\u0f42\u0f0b\u0f67");
|
||||||
uhelp("GU, ,KHO", "\u0f42\u0f74\u0f0d \u0f0d\u0f41\u0f7c");
|
uhelp("GU, ,KHO", "\u0f42\u0f74\u0f0d \u0f0d\u0f41\u0f7c");
|
||||||
uhelp("GU ,KHO", "\u0f42\u0f74\u0f0b \u0f0d\u0f41\u0f7c"); // FIXME: missing a shad after GU, warn about that.
|
uhelp("GU ,KHO", "\u0f42\u0f74\u0f0b \u0f0d\u0f41\u0f7c"); // FIXME: missing a shad after GU, warn about that.
|
||||||
uhelp("GA HA", "\u0f42\u0f0b \u0f67");
|
uhelp("GA HA", "\u0f42\u0f0b \u0f67");
|
||||||
}
|
}
|
||||||
public void testFixedFormSubjoinedConsonants() {
|
public void testFixedFormSubjoinedConsonants() {
|
||||||
// Usual subjoined RA:
|
// Usual subjoined RA:
|
||||||
|
|
Loading…
Reference in a new issue