Results 1 to 2 of 2
- 06-12-2012, 09:00 PM #1
Member
- Join Date
- Jun 2012
- Posts
- 1
- Rep Power
- 0
Find Special String length in jdk1.6 on Unix
When i run this code in jdk1.6 on unix then length of string is 2994 & 2999 but actually length of both string is 3000 Pls tell me the solution
import java.util.ArrayList;
public class TestLength {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ArrayList alList = new ArrayList();
alList.add("D0000001KRHSBC000000000006 KRHSBC002083095 KR KR KRWSVR 1 0203 NN 5 AAAAAAA AAAAA AAAAAAA AAAAA AAAAAAAAAAAAA ÝAÊ/E~E~Ð~Ü/¡(ß*¡) AAAAAAAAAAAAA ÝAÊ/E~E~Ð~Ü/¡(ß*¡) AAAAAAAAAAAAAAAAAAA ATTN:à7ßµãviAàÁlÙ AAAAAAAAAAAAAAAAAAAAAAA ÔŸÞi×~ hÁÊ»Äa jvJµnß ¡9¡0 AAAAA AAAAA maÞÁxzpß¡5CÁ 135-010 135-010 135-010 100 KIM DONG BIN H3000000000000000.000+ ");
alList.add("D0000001KRHSBC000000000008 KRHSBC002085900 KR KR USDSVR 1 0200 NN 5 AAAA AAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA AAAAAAAAAAA AAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAA ÔŸÞi×~ âpÄa HaëÁÎ~2h/310 AAAAAAAAAAAAAAAAAAAAAAAA HaëÁÎ~xzpß25CÁ AAAAA 100-767 100-767 100-767 100-767 13 KIM SUNG WOOK H ");
//java.net.URLDecoder.decode(alList[0],"UTF-8");
//System.out.println(alList.size());
System.out.println(((String) alList.get(0)).length());
//System.out.println(((String) alList.get(1)).length());
}
}
- 06-13-2012, 10:27 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,480
- Rep Power
- 16
Similar Threads
-
Search in a txt file and find how often a special string exists
By Ludwoscht in forum New To JavaReplies: 3Last Post: 01-12-2012, 10:33 AM -
how to compare one string with another dynamic length pattern string?
By ravi.josih53 in forum New To JavaReplies: 11Last Post: 08-15-2011, 10:12 AM -
Unicode File movement from Windows to Unix adding Special Characters
By ragz-82 in forum Advanced JavaReplies: 2Last Post: 02-09-2011, 04:12 PM -
Swing application compiled in jdk1.4 is not working in jdk1.6
By jackrush in forum Advanced JavaReplies: 2Last Post: 10-22-2010, 07:54 PM -
JNLP - Swing application compiled in jdk1.5 not working in jdk1.6
By mahendra.athneria in forum AWT / SwingReplies: 4Last Post: 01-20-2009, 08:27 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks