diff --git a/m4/xerces_msgloader_selection.m4 b/m4/xerces_msgloader_selection.m4
index 737b9cc5d02125203b9358e1c0753f1eb990f891..8c7f178a345179a2f64434b2662d1a14a775859c 100644
--- a/m4/xerces_msgloader_selection.m4
+++ b/m4/xerces_msgloader_selection.m4
@@ -88,7 +88,7 @@ AC_DEFUN([XERCES_MSGLOADER_SELECTION],
 	AC_MSG_CHECKING([for which MsgLoader to use (choices:$ml_list)])
 	for i in 1 2; do
 		# Swap upper/lower case in the ml_list
-		ml_list=`echo $ml_list | tr 'A-Za-z' 'a-zA-Z'`
+		ml_list=`echo $ml_list | tr '[a-z][A-Z]' '[A-Z][a-z]'`
 		
 		# Check for each msgloader, in implicit rank order
 		case $ml_list in
diff --git a/m4/xerces_netaccessor_selection.m4 b/m4/xerces_netaccessor_selection.m4
index 5507a004834986fc0f6c0c27c7d5bcab18f6fc9e..b305513e89979d7f2f362d1ebf993160bab3f2b9 100644
--- a/m4/xerces_netaccessor_selection.m4
+++ b/m4/xerces_netaccessor_selection.m4
@@ -116,7 +116,7 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION],
 	AC_MSG_CHECKING([for which NetAccessor to use (choices:$na_list)])
 	for i in 1 2; do
 		# Swap upper/lower case in string:
-		na_list=`echo $na_list | tr 'A-Za-z' 'a-zA-Z'`
+		na_list=`echo $na_list | tr '[a-z][A-Z]' '[A-Z][a-z]'`
 		
 		# Check for each netaccessor, in implicit rank order
 		case $na_list in
diff --git a/m4/xerces_transcoder_selection.m4 b/m4/xerces_transcoder_selection.m4
index c17c5d84a2b17760e712d8f178b8065a2b81f2bd..ba5488abfc57e8b14678867bd1185a75019ef7bd 100644
--- a/m4/xerces_transcoder_selection.m4
+++ b/m4/xerces_transcoder_selection.m4
@@ -124,7 +124,7 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION],
 	AC_MSG_CHECKING([for which Transcoder to use (choices:$tc_list)])
 	for i in 1 2; do
 		# Swap upper/lower case in the tc_list
-		tc_list=`echo $tc_list | tr 'A-Za-z' 'a-zA-Z'`
+		tc_list=`echo $tc_list | tr '[a-z][A-Z]' '[A-Z][a-z]'`
 		
 		# Check for each transcoder, in implicit rank order
 		case $tc_list in