Skip to content

Commit 74b70de

Browse files
vitali-priText-CI
authored andcommitted
Make lower/upper casing locale independent
DEVSIX-9092 Autoported commit. Original commit hash: [2501c0d]
1 parent 58e2030 commit 74b70de

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

itext.tests/itext.pdfocr.tesseract4.tests/itext/pdfocr/imageformats/ImageFormatIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class ImageFormatIntegrationTest : IntegrationTestHelper {
4343

4444
public ImageFormatIntegrationTest(IntegrationTestHelper.ReaderType type) {
4545
tesseractReader = GetTesseractReader(type);
46-
this.testType = type.ToString().ToLowerInvariant();
46+
this.testType = StringNormalizer.ToLowerCase(type.ToString());
4747
}
4848

4949
[NUnit.Framework.SetUp]

itext/itext.pdfocr.tesseract4/itext/pdfocr/tesseract4/AbstractTesseract4OcrEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public String DoImageOcr(FileInfo input, OutputFormat outputFormat) {
355355
/// <summary>Checks current os type.</summary>
356356
/// <returns>boolean true is current os is windows, otherwise - false</returns>
357357
public virtual bool IsWindows() {
358-
return IdentifyOsType().ToLowerInvariant().Contains("win");
358+
return StringNormalizer.ToLowerCase(IdentifyOsType()).Contains("win");
359359
}
360360

361361
/// <summary>Identifies type of current OS and return it (win, linux).</summary>
@@ -366,7 +366,7 @@ public virtual bool IsWindows() {
366366
public virtual String IdentifyOsType() {
367367
String os = Environment.GetEnvironmentVariable("os.name") == null ? Environment.GetEnvironmentVariable("OS"
368368
) : Environment.GetEnvironmentVariable("os.name");
369-
return os.ToLowerInvariant();
369+
return StringNormalizer.ToLowerCase(os);
370370
}
371371

372372
/// <summary>

itext/itext.pdfocr.tesseract4/itext/pdfocr/tesseract4/Tesseract4ExecutableOcrEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ private String GetExtension(FileInfo inputImage) {
412412
if (index > 0) {
413413
String extension = new String(inputImage.FullName.ToCharArray(), index, inputImage.FullName.Length - index
414414
);
415-
return extension.ToLowerInvariant();
415+
return StringNormalizer.ToLowerCase(extension);
416416
}
417417
}
418418
return ".png";

itext/itext.pdfocr.tesseract4/itext/pdfocr/tesseract4/Tesseract4OcrEngineProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ internal virtual iText.Pdfocr.Tesseract4.Tesseract4OcrEngineProperties SetUserWo
342342
inputStream) {
343343
SetPathToUserWordsFile(null);
344344
if (!GetLanguages().Contains(language)) {
345-
if (DEFAULT_LANGUAGE.Equals(language.ToLowerInvariant())) {
345+
if (DEFAULT_LANGUAGE.Equals(StringNormalizer.ToLowerCase(language))) {
346346
IList<String> languagesList = GetLanguages();
347347
languagesList.Add(language);
348348
SetLanguages(languagesList);

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
78b9822d4fd19e4c404b571546cd23efa6ba1095
1+
2501c0de358f95308e52affb98db1719eae685a9

0 commit comments

Comments
 (0)