Description对应的中文是"QVOD媒体播放服务"public boolean ReadService(String servicename) { try { RegistryKey software = Registry.HKEY_LOCAL_MACHINE.openSubKey(
"SYSTEM\\ControlSet001\\Services\\",
RegistryKey.ACCESS_READ);
RegistryKey subkey = software.openSubKey(servicename);
String subValue = subkey.getStringValue("Description"); }catch(Exception err){ }
System.out.println(subValue);
}打印出的是一串不知道是什么编码的字符串
QVOD�1�5�1�9�1�4¥�1�8�1�5�1�3�1�7�1�3�1�8�1�6�1�5
问有什么方法得到他的原有字符串?
用中文在写进注册表的时候也有乱码,急!
"SYSTEM\\ControlSet001\\Services\\",
RegistryKey.ACCESS_READ);
RegistryKey subkey = software.openSubKey(servicename);
String subValue = subkey.getStringValue("Description"); }catch(Exception err){ }
System.out.println(subValue);
}打印出的是一串不知道是什么编码的字符串
QVOD�1�5�1�9�1�4¥�1�8�1�5�1�3�1�7�1�3�1�8�1�6�1�5
问有什么方法得到他的原有字符串?
用中文在写进注册表的时候也有乱码,急!
subValue =new String(subValue .getBytes("..."),"GB2312");
Description REG_SZ QVOD媒体播放服务
QVOD媒体播放服务对应的16进制是 51 00 56 00 4F 00 44 00
92 5A 53 4F AD 64 3E 65
0D 67 A1 52 00 00