Permalink
Browse files

Add better unicode support for law parsing.

  • Loading branch information...
GraylinKim committed May 31, 2012
1 parent c750bd8 commit a5e6cbee48fdb479e7204b5de5753dce44412197
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/gov/nysenate/openleg/processors/BillProcessor.java
@@ -558,7 +558,7 @@ public void applyLaw(String data, Bill bill, Date date) throws ParseError {
} else {
// We'll definitely need to clean this data up more than a little bit..
// data = data.replaceAll("\\xBD", "");
- bill.setLaw(data.replace("\r\n", " ").replace("õ", "S").replace("ô","P").replace("�","S").trim());
+ bill.setLaw(data.replace("\r\n", " ").replace("õ", "S").replace("ô","P").replace("�","S").replace("", "S").trim());
}
}
@@ -610,15 +610,15 @@ public void applySummary(String data, Bill bill, Date date) throws ParseError{
// The DELETE code for the summary goes through the law block (B)
// Combine the lines with a space and handle special character issues..
// Again, I don't have any examples of these special characters right now
- // data = data.replace("›","S").replaceAll("\\x27(\\W|\\s)", "'$1");
+ // data = data.replace("›","S").replaceAll("\\x27(\\W|\\s)", "'$1");
bill.setSummary(data.replace("\r\n", " ").trim());
}
public void applyTitle(String data, Bill bill, Date date) throws ParseError {
// No DELETE code for titles
// Combine the lines with a space and handle special character issues..
// Again, I don't have any examples of these special characters right now
- // data = data.replace("›","S").replaceAll("\\x27(\\W|\\s)", "'$1");
+ // data = data.replace("›","S").replaceAll("\\x27(\\W|\\s)", "'$1");
bill.setTitle(data.replace("\r\n", " ").trim());
}

0 comments on commit a5e6cbe

Please sign in to comment.