The Problem of Chinese Scrambling Code in java Encryption and Decryption

  java, question
import javax.crypto.Cipher;
 import javax.crypto.KeyGenerator;
 import javax.crypto.SecretKey;
 import javax.crypto.SecretKeyFactory;
 import javax.crypto.spec.DESKeySpec;
 
 import org.apache.commons.codec.BinaryDecoder;
 import org.apache.commons.codec.binary.Hex;
 
 public class DESDemo {
 public static final String src = "des test";
 public static void main(String[] args)
 bracket
 jdkDES();
 bcDES();
 
 bracket
 
 private static void bcDES() {
 
 bracket
 
 private static void jdkDES() {
 try{
 //generate KEY
 KeyGenerator keyGenerator = KeyGenerator.getInstance("DES");
 keyGenerator.init(56);
 System.out.println(keyGenerator.getAlgorithm());
 System.out.println(keyGenerator.getProvider());
 
 SecretKey secretKey = keyGenerator.generateKey();
 byte[] bytesKey = secretKey.getEncoded();
 System.out.println(secretKey.getAlgorithm());
 System.out.println(secretKey.getFormat());
 
 //Generate KEY through key conversion
 DESKeySpec desKeySpec = new DESKeySpec(bytesKey);
 SecretKeyFactory factory = SecretKeyFactory.getInstance("DES");
 SecretKey convertedKey = factory.generateSecret(desKeySpec);
 
 //encryption
 Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");  //Algorithm/Working Method/Filling Method
 cipher.init(Cipher.ENCRYPT_MODE, convertedKey);
 Byte[] result = cipher.doFinal ("content to be encrypted". getBytes ());
 Out.println ("jdkdes encrypt:" add Hex.encodeHexString(result));
 
 //Decrypt
 cipher.init(Cipher.DECRYPT_MODE,convertedKey);
 result = cipher.doFinal(result);
 //system.out.println ("jddsdescrypt:" plus new String(result));    //jdk des decrypt:?  ?  ?  ?  ?  ?  ?  ?  ?  ?  Direct output can be garbled
 Out.println ("jddsdescrypt:" plus new String( result,"utf-8 "));    //jdk des decrypt:?  ?  ?  ?  ?  ?  ?  ?  ?  ?  Still confused
 
 
 bracket
 catch(Exception e) {
 e.printStackTrace();
 bracket
 bracket
 bracket

Is the default encoding of windows system gbk?

Windows system? Try gbk instead.