mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Symbian Installation File] Set up encoding earlier.
This commit is contained in:
@@ -72,7 +72,6 @@ public sealed partial class Symbian
|
|||||||
|
|
||||||
public void GetInformation(IFilter filter, Encoding encoding, out string information)
|
public void GetInformation(IFilter filter, Encoding encoding, out string information)
|
||||||
{
|
{
|
||||||
_encoding = encoding ?? Encoding.GetEncoding("windows-1252");
|
|
||||||
information = "";
|
information = "";
|
||||||
var description = new StringBuilder();
|
var description = new StringBuilder();
|
||||||
var languages = new List<string>();
|
var languages = new List<string>();
|
||||||
@@ -118,8 +117,48 @@ public sealed partial class Symbian
|
|||||||
AaruConsole.DebugWriteLine(MODULE_NAME, "sh.reserved1 = {0}", sh.reserved1);
|
AaruConsole.DebugWriteLine(MODULE_NAME, "sh.reserved1 = {0}", sh.reserved1);
|
||||||
AaruConsole.DebugWriteLine(MODULE_NAME, "sh.reserved2 = {0}", sh.reserved2);
|
AaruConsole.DebugWriteLine(MODULE_NAME, "sh.reserved2 = {0}", sh.reserved2);
|
||||||
|
|
||||||
|
_release6 = false;
|
||||||
|
|
||||||
|
if(sh.uid1 == SYMBIAN9_MAGIC)
|
||||||
|
{
|
||||||
|
description.AppendLine(Localization.Symbian_Installation_File);
|
||||||
|
description.AppendLine(Localization.Symbian_9_1_or_later);
|
||||||
|
description.AppendFormat(Localization.Application_ID_0, sh.uid3).AppendLine();
|
||||||
|
_release6 = true;
|
||||||
|
|
||||||
|
description.AppendLine();
|
||||||
|
description.AppendLine("This file format is not yet implemented, no more information can be decoded.");
|
||||||
|
|
||||||
|
information = description.ToString();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sh.uid3 == SYMBIAN_MAGIC)
|
||||||
|
{
|
||||||
|
description.AppendLine(Localization.Symbian_Installation_File);
|
||||||
|
|
||||||
|
switch(sh.uid2)
|
||||||
|
{
|
||||||
|
case EPOC_MAGIC:
|
||||||
|
description.AppendLine(Localization.Symbian_3_or_later);
|
||||||
|
break;
|
||||||
|
case EPOC6_MAGIC:
|
||||||
|
description.AppendLine(Localization.Symbian_6_or_later);
|
||||||
|
_release6 = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
description.AppendFormat(Localization.Unknown_EPOC_magic_0, sh.uid2).AppendLine();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
description.AppendFormat(Localization.Application_ID_0, sh.uid1).AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
if(sh.options.HasFlag(SymbianOptions.IsUnicode))
|
if(sh.options.HasFlag(SymbianOptions.IsUnicode))
|
||||||
_encoding = Encoding.Unicode;
|
_encoding = Encoding.Unicode;
|
||||||
|
else
|
||||||
|
_encoding = encoding ?? Encoding.GetEncoding("windows-1252");
|
||||||
|
|
||||||
var br = new BinaryReader(stream);
|
var br = new BinaryReader(stream);
|
||||||
|
|
||||||
@@ -166,44 +205,6 @@ public sealed partial class Symbian
|
|||||||
capabilities.Add(cap_Key, cap_Value);
|
capabilities.Add(cap_Key, cap_Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
_release6 = false;
|
|
||||||
|
|
||||||
if(sh.uid1 == SYMBIAN9_MAGIC)
|
|
||||||
{
|
|
||||||
description.AppendLine(Localization.Symbian_Installation_File);
|
|
||||||
description.AppendLine(Localization.Symbian_9_1_or_later);
|
|
||||||
description.AppendFormat(Localization.Application_ID_0, sh.uid3).AppendLine();
|
|
||||||
_release6 = true;
|
|
||||||
|
|
||||||
description.AppendLine();
|
|
||||||
description.AppendLine("This file format is not yet implemented, no more information can be decoded.");
|
|
||||||
|
|
||||||
information = description.ToString();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sh.uid3 == SYMBIAN_MAGIC)
|
|
||||||
{
|
|
||||||
description.AppendLine(Localization.Symbian_Installation_File);
|
|
||||||
|
|
||||||
switch(sh.uid2)
|
|
||||||
{
|
|
||||||
case EPOC_MAGIC:
|
|
||||||
description.AppendLine(Localization.Symbian_3_or_later);
|
|
||||||
break;
|
|
||||||
case EPOC6_MAGIC:
|
|
||||||
description.AppendLine(Localization.Symbian_6_or_later);
|
|
||||||
_release6 = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
description.AppendFormat(Localization.Unknown_EPOC_magic_0, sh.uid2).AppendLine();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
description.AppendFormat(Localization.Application_ID_0, sh.uid1).AppendLine();
|
|
||||||
}
|
|
||||||
|
|
||||||
description.AppendFormat(Localization.UIDs_checksum_0, sh.uid4).AppendLine();
|
description.AppendFormat(Localization.UIDs_checksum_0, sh.uid4).AppendLine();
|
||||||
description.AppendFormat(Localization.Archive_options_0, sh.options).AppendLine();
|
description.AppendFormat(Localization.Archive_options_0, sh.options).AppendLine();
|
||||||
description.AppendFormat(Localization.CRC16_of_header_0, sh.crc16).AppendLine();
|
description.AppendFormat(Localization.CRC16_of_header_0, sh.crc16).AppendLine();
|
||||||
|
|||||||
Reference in New Issue
Block a user