Bonjour,


j'ai utilisé ce code pour fait une convention EBCDIC to ASCII.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package ma.hps.pcrd.iso.isonet.util;
 
 
 
public class Ebcdic {
 
	public static void main(String[] args) throws Exception {
 
 
	   String sEbcdic = "1234567890abcdefghijklmnopqurstuvwxyz";
	    String sReencodedEbcdic = null;
	    try {
	      String sReturnEbcdic = (new String(new String(sEbcdic.getBytes(),
	"ASCII").getBytes("Cp1047")));
	      System.out.println(sReturnEbcdic);
 
	      sReencodedEbcdic = (new String(new String(sReturnEbcdic.getBytes(),
	"Cp1047").getBytes("ASCII")));
	      System.out.println(sReencodedEbcdic);
 
 
 
	    }
	    catch (java.io.UnsupportedEncodingException e) {} 
 
	}
 
 
}
mais j'ai eu comme résultat :
ñòóôõö÷øùð?‚ƒ„…†‡ˆ‰‘’“”•–—˜¤™¢£¤¥¦§¨©
1234567890bcdefghijklmnopqurstuvwxyz
le caractère "a" n'est pas correct !!


merci pour votre aide.