mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 05:44:51 +00:00
Added Setting charset in commandline (-charset XXX)
Default charset for SWF files version <= 5 is system charset
This commit is contained in:
@@ -936,11 +936,13 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
* @throws IOException
|
||||
*/
|
||||
public void saveTo(OutputStream os) throws IOException {
|
||||
checkCharset();
|
||||
byte[] uncompressedData = saveToByteArray();
|
||||
compress(new ByteArrayInputStream(uncompressedData), os, compression, lzmaProperties);
|
||||
}
|
||||
|
||||
public void saveTo(OutputStream os, boolean gfx) throws IOException {
|
||||
checkCharset();
|
||||
byte[] uncompressedData = saveToByteArray(gfx);
|
||||
compress(new ByteArrayInputStream(uncompressedData), os, compression, lzmaProperties);
|
||||
}
|
||||
@@ -980,6 +982,12 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
private byte[] saveToByteArray() throws IOException {
|
||||
return saveToByteArray(gfx);
|
||||
}
|
||||
|
||||
private void checkCharset() {
|
||||
if (version > 5) {
|
||||
charset = Utf8Helper.charsetName;
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] saveToByteArray(boolean gfx) throws IOException {
|
||||
byte[] data;
|
||||
|
||||
Reference in New Issue
Block a user