Added support for ISO-8859-16

This commit is contained in:
Dawid Pietrykowski 2022-09-10 20:53:06 +02:00
parent 756cf37d8f
commit 729a7107eb

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Unity.VisualScripting;
namespace Parking namespace Parking
{ {
@ -36,22 +37,18 @@ namespace Parking
? ParkingPreference.Front ? ParkingPreference.Front
: ParkingPreference.Back; : ParkingPreference.Back;
Size size; Size size;
switch (lineData[2]) { string sizeString = lineData[2];
case "Mały": if (sizeString == "Mały" || sizeString == "Ma" + (char)0xB3 + "y") {
size = Size.A; size = Size.A;
break; }else if (sizeString == "Średni" || sizeString == (char)0xD7 + "redni") {
case "Średni":
size = Size.B; size = Size.B;
break; }else if (sizeString == "Duży" || sizeString == "Du" + (char)0xBF + "y") {
case "Duży":
size = Size.C; size = Size.C;
break; }else if (sizeString == "Max") {
case "Max":
size = Size.D; size = Size.D;
break; }
default: else {
size = Size.A; size = Size.A;
break;
} }
DateTime realArrival = DateTime.Parse(lineData[5].Contains(':') ? lineData[5] : lineData[5] + ":00", DateTime realArrival = DateTime.Parse(lineData[5].Contains(':') ? lineData[5] : lineData[5] + ":00",