Corrected string conversion.

This commit is contained in:
2017-07-11 02:32:51 +01:00
parent 9f19747270
commit f2f7bcc2e9
2 changed files with 6 additions and 6 deletions

View File

@@ -192,9 +192,9 @@ namespace DiscImageChef.Filesystems
sb.AppendFormat("{0} segments", f2fsSb.segment_count).AppendLine();
sb.AppendFormat("Root directory resides on inode {0}", f2fsSb.root_ino).AppendLine();
sb.AppendFormat("Volume UUID: {0}", f2fsSb.uuid).AppendLine();
sb.AppendFormat("Volume name: {0}", Encoding.Unicode.GetString(f2fsSb.volume_name)).AppendLine();
sb.AppendFormat("Volume last mounted on kernel version: {0}", Encoding.ASCII.GetString(f2fsSb.version)).AppendLine();
sb.AppendFormat("Volume created on kernel version: {0}", Encoding.ASCII.GetString(f2fsSb.init_version)).AppendLine();
sb.AppendFormat("Volume name: {0}", StringHandlers.CToString(f2fsSb.volume_name, Encoding.Unicode, true)).AppendLine();
sb.AppendFormat("Volume last mounted on kernel version: {0}", StringHandlers.CToString(f2fsSb.version)).AppendLine();
sb.AppendFormat("Volume created on kernel version: {0}", StringHandlers.CToString(f2fsSb.init_version)).AppendLine();
information = sb.ToString();
@@ -204,7 +204,7 @@ namespace DiscImageChef.Filesystems
xmlFSType.Clusters = (long)f2fsSb.block_count;
xmlFSType.ClusterSize = 1 << (int)f2fsSb.log_blocksize;
xmlFSType.DataPreparerIdentifier = Encoding.ASCII.GetString(f2fsSb.init_version);
xmlFSType.VolumeName = Encoding.Unicode.GetString(f2fsSb.volume_name);
xmlFSType.VolumeName = StringHandlers.CToString(f2fsSb.volume_name, Encoding.Unicode, true);
xmlFSType.VolumeSerial = f2fsSb.uuid.ToString();
}

View File

@@ -131,7 +131,7 @@ namespace DiscImageChef.Filesystems
sb.AppendFormat("{0} bytes per block", reiserSb.blocksize).AppendLine();
sb.AppendFormat("Volume disk format: {0}", reiserSb.diskformat).AppendLine();
sb.AppendFormat("Volume UUID: {0}", reiserSb.uuid).AppendLine();
sb.AppendFormat("Volume name: {0}", CurrentEncoding.GetString(reiserSb.label)).AppendLine();
sb.AppendFormat("Volume name: {0}", StringHandlers.CToString(reiserSb.label, CurrentEncoding)).AppendLine();
information = sb.ToString();
@@ -139,7 +139,7 @@ namespace DiscImageChef.Filesystems
xmlFSType.Type = "Reiser 4 filesystem";
xmlFSType.ClusterSize = reiserSb.blocksize;
xmlFSType.Clusters = (long)(((partitionEnd - partitionStart) * imagePlugin.GetSectorSize()) / reiserSb.blocksize);
xmlFSType.VolumeName = CurrentEncoding.GetString(reiserSb.label);
xmlFSType.VolumeName = StringHandlers.CToString(reiserSb.label, CurrentEncoding);
xmlFSType.VolumeSerial = reiserSb.uuid.ToString();
}