Fix some race conditions with the texture references
Add queuing of files Split CEncoding to separate file
This commit is contained in:
1 parent
1121261a4a
commit
649f81494e
11 files changed
+513
-196
No files matched your search
@@ -0,0 +1,39 @@
|
||||
using System.Text;
|
||||
|
||||
namespace VocaluxeLib
|
||||
{
|
||||
static class CEncoding
|
||||
{
|
||||
public static Encoding GetEncoding(this string encodingName)
|
||||
{
|
||||
switch (encodingName)
|
||||
{
|
||||
case "AUTO":
|
||||
return Encoding.Default;
|
||||
case "CP1250":
|
||||
return Encoding.GetEncoding(1250);
|
||||
case "CP1252":
|
||||
return Encoding.GetEncoding(1252);
|
||||
case "LOCALE":
|
||||
return Encoding.Default;
|
||||
case "UTF8":
|
||||
return Encoding.UTF8;
|
||||
default:
|
||||
return Encoding.Default;
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetEncodingName(this Encoding enc)
|
||||
{
|
||||
string result = "UTF8";
|
||||
|
||||
if (enc.CodePage == 1250)
|
||||
result = "CP1250";
|
||||
|
||||
if (enc.CodePage == 1252)
|
||||
result = "CP1252";
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user