- 讲师:刘萍萍 / 谢楠
- 课时:160h
- 价格 4580 元
特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关
配套通关班送国网在线题库一套
百度广告
简体中文有两种常用编码:GB2312 和 Unicode. 它们的对应关系可以用
下面的程式所生成:
/** * GB2312Unicde.java * Copyright (c) 2003 by Dr. Herong Yang, http://www.herongyang.com/ */ import java.io.*; import java.nio.*; import java.nio.charset.*; class GB2312Unicde { static OutputStream out = null; static char hexDigit = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; static int b_out = {201,267,279,293,484,587,625,657,734,782,827, 874,901,980,5590}; static int e_out = {216,268,280,294,494,594,632,694,748,794,836, 894,903,994,5594}; public static void main(String args) { try { out = new FileOutputStream("gb2312.gb"); writeCode(); out.close(); } catch (IOException e) { System.out.println(e.toString()); } } public static void writeCode() throws IOException { boolean reserved = false; String name = null; // GB2312 is not supported by JDK. So I am using GBK. CharsetDecoder gbdc = Charset.forName("GBK").newDecoder(); CharsetEncoder uxec = Charset.forName("UTF-16BE").newEncoder(); CharsetEncoder u8ec = Charset.forName("UTF-8").newEncoder(); ByteBuffer gbbb = null; ByteBuffer uxbb = null; ByteBuffer u8bb = null; CharBuffer cb = null; int count = 0; for (int i=1; i=1 && i=10 && i=16 && i=56 && i=88 && i
责编:罗莉 上一篇:JSP的九个隐含对象 发表评论(共0条评论)
国家电网校园招聘考试直播课程通关班
国家电网招聘考试录播视频课程
|
点击加载更多评论>>