Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AionClientViewer/Controls/ImageViewerControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions Common/DirManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using monono2.Common.FileFormats.Pak;
Expand Down Expand Up @@ -27,7 +28,7 @@ public DirManager(string rootPath, IEnumerable<string> 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();
}
Expand Down Expand Up @@ -140,7 +141,7 @@ private SortedDictionary<string, PakReader> 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)
Expand Down
3 changes: 2 additions & 1 deletion Common/FileFormats/BrushLstLoader.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion Common/FileFormats/Pak/PakUtil.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
Expand All @@ -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)
Expand Down