summaryrefslogtreecommitdiff
path: root/Aktywator/Common.cs
diff options
context:
space:
mode:
authorMichał Zimniewicz <michzimny@users.noreply.github.com>2017-12-06 23:57:31 +0100
committerGitHub <noreply@github.com>2017-12-06 23:57:31 +0100
commit80cd31c1c8e7cef2cfbf6148df3d9ec2d2a23279 (patch)
tree4071e574a3e611cf4d8a19e231ff7ecc659949fa /Aktywator/Common.cs
parent83e064ccb67f0b68b1f947026301cd3905d06a3c (diff)
parentf12d2b996b165d66f4c32eef4a3bdfb89309670d (diff)
Merge pull request #29 from michzimny/1.1-beta
Scalenie gałęzi beta do master
Diffstat (limited to 'Aktywator/Common.cs')
-rw-r--r--Aktywator/Common.cs22
1 files changed, 2 insertions, 20 deletions
diff --git a/Aktywator/Common.cs b/Aktywator/Common.cs
index d00649d..b00157c 100644
--- a/Aktywator/Common.cs
+++ b/Aktywator/Common.cs
@@ -17,27 +17,9 @@ namespace Aktywator
return Environment.GetEnvironmentVariable("ProgramFiles");
}
- public static string bezOgonkow(string str)
+ public static string bezOgonkow(string text)
{
- str = str.Replace('ą', 'a');
- str = str.Replace('ć', 'c');
- str = str.Replace('ę', 'e');
- str = str.Replace('ł', 'l');
- str = str.Replace('ń', 'n');
- str = str.Replace('ó', 'o');
- str = str.Replace('ś', 's');
- str = str.Replace('ź', 'z');
- str = str.Replace('ż', 'z');
- str = str.Replace('Ą', 'A');
- str = str.Replace('Ć', 'C');
- str = str.Replace('Ę', 'E');
- str = str.Replace('Ł', 'L');
- str = str.Replace('Ń', 'N');
- str = str.Replace('Ó', 'O');
- str = str.Replace('Ś', 'S');
- str = str.Replace('Ź', 'Z');
- str = str.Replace('Ż', 'Z');
- return str;
+ return Encoding.ASCII.GetString(Encoding.GetEncoding(1251).GetBytes(text));
}
}
}