|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
package com.platform.form;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
|
|
import com.platform.entities.SqlFileInfoEntity;
|
|
|
|
|
|
|
|
|
|
public class ScriptForm {
|
|
|
|
@ -19,7 +22,17 @@ public class ScriptForm {
|
|
|
|
|
* @param content the content to set
|
|
|
|
|
*/
|
|
|
|
|
public void setContent(String content) {
|
|
|
|
|
this.content = content;
|
|
|
|
|
Properties pro = System.getProperties();
|
|
|
|
|
String osName = pro.getProperty("os.name");
|
|
|
|
|
try {
|
|
|
|
|
if("Linux".equals(osName)||"linux".equals(osName)){
|
|
|
|
|
this.content = new String(content.getBytes("iso-8859-1"),"UTF-8");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.content = new String(content.getBytes("iso-8859-1"),"GBK");
|
|
|
|
|
}
|
|
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|