diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java index 22b4b38a2..709fe332a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -198,23 +198,10 @@ public class SWFOutputStream extends OutputStream { * @throws IOException */ public void writeNetString(String value) throws IOException { - byte[] data = value.getBytes(); - writeUI8(data.length); - write(data); - } - - /** - * Writes netstring (length + string) value to the stream - * - * @param value String value - * @param charset - * @throws IOException - */ - public void writeNetString(String value, Charset charset) throws IOException { byte[] data = value.getBytes(charset); writeUI8(data.length); write(data); - } + } /** * Writes UI32 (Unsigned 32bit integer) value to the stream diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 2e04c517a..511ba8a97 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -256,11 +256,7 @@ public class DefineFont2Tag extends FontTag { sos.writeUB(1, fontFlagsItalic ? 1 : 0); sos.writeUB(1, fontFlagsBold ? 1 : 0); sos.writeLANGCODE(languageCode); - if (swf.version >= 6) { - sos.writeNetString(fontName, Utf8Helper.charset); - } else { - sos.writeNetString(fontName); - } + sos.writeNetString(fontName); int numGlyphs = glyphShapeTable.size(); sos.writeUI16(numGlyphs); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index ea55e6dee..189f2eb00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -253,11 +253,7 @@ public class DefineFont3Tag extends FontTag { sos.writeUB(1, fontFlagsItalic ? 1 : 0); sos.writeUB(1, fontFlagsBold ? 1 : 0); sos.writeLANGCODE(languageCode); - if (swf.version >= 6) { - sos.writeNetString(fontName, Utf8Helper.charset); - } else { - sos.writeNetString(fontName); - } + sos.writeNetString(fontName); sos.writeUI16(numGlyphs); for (long offset : offsetTable) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index f984e867e..46a8b1d19 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -118,11 +118,7 @@ public class DefineFontInfo2Tag extends FontInfoTag { @Override public void getData(SWFOutputStream sos) throws IOException { sos.writeUI16(fontID); - if (swf.version >= 6) { - sos.writeNetString(fontName, Utf8Helper.charset); - } else { - sos.writeNetString(fontName); - } + sos.writeNetString(fontName); sos.writeUB(2, reserved); sos.writeUB(1, fontFlagsSmallText ? 1 : 0); sos.writeUB(1, fontFlagsShiftJIS ? 1 : 0); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index c74ae7d4d..44f312b9c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -116,11 +116,7 @@ public class DefineFontInfoTag extends FontInfoTag { @Override public void getData(SWFOutputStream sos) throws IOException { sos.writeUI16(fontID); - if (swf.version >= 6) { - sos.writeNetString(fontName, Utf8Helper.charset); - } else { - sos.writeNetString(fontName); - } + sos.writeNetString(fontName); sos.writeUB(2, reserved); sos.writeUB(1, fontFlagsSmallText ? 1 : 0); sos.writeUB(1, fontFlagsShiftJIS ? 1 : 0);