This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 7c51e696d StringUtils.stripAccents(String) doesn't handle T with stroke
7c51e696d is described below

commit 7c51e696d59fafe3c6f6e422fd7062ae9654bf50
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue May 14 11:18:54 2024 -0400

    StringUtils.stripAccents(String) doesn't handle T with stroke
---
 src/changes/changes.xml                                          | 1 +
 src/main/java/org/apache/commons/lang3/StringUtils.java          | 9 +++++++++
 .../java/org/apache/commons/lang3/StringUtilsTrimStripTest.java  | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7fa1a899b..34841687a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -133,6 +133,7 @@ The <action> type attribute can be add,update,fix,remove.
     <action                   type="fix" dev="ggregory" 
due-to="hunghhdev">StringUtils.stripAccents(String) doesn't handle "\u0111" and 
"\u0110" (Vietnamese) #1216.</action> 
     <action                   type="fix" dev="ggregory" due-to="Gary 
Gregory">StringUtils.stripAccents(String) doesn't handle I with bar.</action> 
     <action                   type="fix" dev="ggregory" due-to="Gary 
Gregory">StringUtils.stripAccents(String) doesn't handle U with bar.</action> 
+    <action                   type="fix" dev="ggregory" due-to="Gary 
Gregory">StringUtils.stripAccents(String) doesn't handle T with 
stroke.</action> 
     <!-- UPDATE -->
     <action                   type="update" dev="sebb" 
due-to="Dependabot">Bump commons-parent from 64 to 69 #1194.</action>
     <action                   type="update" dev="ggregory" 
due-to="Dependabot">Bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 
3.2.0 #1175.</action>
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 6fd3dc839..d22342a9e 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -1453,6 +1453,15 @@ public class StringUtils {
                 // MODIFIER LETTER SMALL U BAR
                 decomposed.setCharAt(i, 'u');
                 break;
+            // T with stroke
+            case '\u0166':
+                // LATIN CAPITAL LETTER T WITH STROKE
+                decomposed.setCharAt(i, 'T');
+                break;
+            case '\u0167':
+                // LATIN SMALL LETTER T WITH STROKE
+                decomposed.setCharAt(i, 't');
+                break;
             default:
                 break;
             }
diff --git 
a/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java 
b/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
index f38f08f3d..aa827ddf5 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
@@ -115,6 +115,11 @@ public class StringUtilsTrimStripTest extends 
AbstractLangTest {
         assertEquals("U u U u", StringUtils.stripAccents("\u0244 \u0289 \u1D7E 
\u1DB6"));
     }
 
+    @Test
+    public void testStripAccentsTWithStroke() {
+        assertEquals("T t", StringUtils.stripAccents("\u0166 \u0167"));
+    }
+
     @Test
     public void testStripAll() {
         // test stripAll method, merely an array version of the above strip

Reply via email to