Hello
I wrote a piece of code to remove diacritics :

String urlset3a[]={"À","Á"....
String urlset3b[]={"a","a"....
for (idx=0;idx<urlset3a.length;idx++)
{
  String lit=null;
  try{lit=new String(urlset3a[idx].getBytes(),"UTF-8");}catch(Exception 
ex){}
  if (lit!=null)
   sb_replace(ret,lit,urlset3b[idx]);
}

This code works perfectly on macosx and on linux when compiled on the 
plateform it is run on.

javac com/adl/java/utils/Stringutils.java
java com.adl.java.utils.Stringutils "aÄaé° ç%Щx"
URL:aaae-cx

But when I compile this class on macosx and if I copy and use this 
.class on linux, the accents and special characters are no more replaced 
correctly (same in the other way) :

Mac class used on linux :
java com.adl.java.utils.Stringutils "aÄaé° ç%Щx"
aäaé°-çx

Linux class used on mac :
java com.adl.java.utils.Stringutils "aÄaé° ç%Щx"
URL:a?a??-?x

My LANG env var is fr_FR.UTF-8 on both plateforms. java version 
"1.5.0_17" on linux and "1.5.0_22" on mac


Does anybody know why and how to correct this ? (this class is in a jar 
that is copied to the server and not compiled by resin)
Thanks
-- 
Riccardo Cohen
Architecte du Logiciel
http://www.architectedulogiciel.fr
+33 (0)6.09.83.64.49
Membre du réseau http://www.reflexe-conseil-centre.org




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to