diff --git a/AionClientViewer/Controls/ImageViewerControl.cs b/AionClientViewer/Controls/ImageViewerControl.cs index aa01c13..246ca28 100644 --- a/AionClientViewer/Controls/ImageViewerControl.cs +++ b/AionClientViewer/Controls/ImageViewerControl.cs @@ -43,6 +43,7 @@ private bool TryLoadFromKnownMonoImageFormats(Stream s, out Texture2D result) } catch (InvalidOperationException e) { + Log.WriteLine("TryLoadFromKnownMonoImageFormats : " + e.Message); result = null; } return (result != null); @@ -88,6 +89,8 @@ private bool TryLoadDds(Stream s, out Texture2D result) result = tex; } catch (Exception e) { + + Log.WriteLine("TryLoadDds : " + e.Message); result = null; } return (result != null); diff --git a/Common/DirManager.cs b/Common/DirManager.cs index 9ac0028..f07b547 100644 --- a/Common/DirManager.cs +++ b/Common/DirManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using monono2.Common.FileFormats.Pak; @@ -27,7 +28,7 @@ public DirManager(string rootPath, IEnumerable subdirs) private void SetRootPath(string rootPath) { - m_rootPath = rootPath.ToLower(); + m_rootPath = rootPath.ToLower(new CultureInfo("en-US", false)); if (!Directory.Exists(m_rootPath)) throw new DirectoryNotFoundException(); } @@ -140,7 +141,7 @@ private SortedDictionary GenerateFileListing(string subpath) private string NormalizePath(string path) { - return path.ToLower().Replace('/', '\\'); + return path.ToLower(new CultureInfo("en-US", false)).Replace('/', '\\'); } private string GetRelativePath(string path) diff --git a/Common/FileFormats/BrushLstLoader.cs b/Common/FileFormats/BrushLstLoader.cs index 74f5293..c3efde5 100644 --- a/Common/FileFormats/BrushLstLoader.cs +++ b/Common/FileFormats/BrushLstLoader.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; using Microsoft.Xna.Framework; @@ -80,7 +81,7 @@ private void Load(BinaryReader meshInputStream) // int dw1 = meshInputStream.readInt(); meshInputStream.Read(fileNameBytes, 0, 128); - info.filename = Encoding.UTF8.GetString(fileNameBytes).Trim().Trim('\0').ToLower().Replace('\\', '/'); + info.filename = Encoding.UTF8.GetString(fileNameBytes).Trim().Trim('\0').ToLower(new CultureInfo("en-US", false)).Replace('\\', '/'); meshInputStream.ReadInt32(); // skip - usually 1, sometimes 3 diff --git a/Common/FileFormats/Pak/PakUtil.cs b/Common/FileFormats/Pak/PakUtil.cs index 7b45a02..059eddd 100644 --- a/Common/FileFormats/Pak/PakUtil.cs +++ b/Common/FileFormats/Pak/PakUtil.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Text; @@ -10,7 +11,7 @@ public static class PakUtil { public static string NormalizeFilename(string originalFilename) { - return originalFilename.ToLower().Replace('\\', '/'); + return originalFilename.ToLower(new CultureInfo("en-US", false)).Replace('\\', '/'); } public static string ReadFilename(BinaryReader br, int length)