Skip to content

Commit

Permalink
Merge pull request #488 from ishimoto/utf8migration
Browse files Browse the repository at this point in the history
add UTF-8 migration SQLStatements from Input Stream
  • Loading branch information
ishimoto committed Oct 1, 2013
2 parents b7453e1 + 0be1657 commit 6c85da9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,8 @@ else if (ch == '-' && prev == '-' && !inQuotes) {
* if there is a problem reading the stream
*/
public NSArray<String> splitSQLStatementsFromInputStream(InputStream is) throws IOException {
return splitSQLStatements(ERXStringUtilities.stringFromInputStream(is));
String encoding = System.getProperty("file.encoding");
return splitSQLStatements(ERXStringUtilities.stringIsNullOrEmpty(encoding) ? ERXStringUtilities.stringFromInputStream(is) : ERXStringUtilities.stringFromInputStream(is, encoding));
}

/**
Expand Down

0 comments on commit 6c85da9

Please sign in to comment.