哪位大侠对unicode有研究啊 从0x0000到0xffff 哪些是没有定义过的不可以使用的  急需 谢谢帮助

解决方案 »

  1.   

    谁背unicode表…… http://www.nengcha.com/code/unicode/class/ 
      

  2.   

    只记得U+D800到U+DFFF是保留的,用于对辅助平面内的字符(U+10000 ~ U+10FFFF)进行UTF-16编码。看你这问法,是不打算支持辅助平面内的字符,可以考虑
      

  3.   

    哪有标准说明  上面查的表似乎覆盖了整个范围 0x0000到0xffff
    可是却是由不支持的
    典型代码如下message="中国中国123456789";int i;
    byte[] unicodebyte = null;
    try {
    unicodebyte = message.getBytes("unicode");
    } catch (UnsupportedEncodingException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    }
    unicodebyte[18] = (byte)-48;
    unicodebyte[19] = (byte)-33;
    try {
    message = new String(unicodebyte, "unicode");
    } catch (UnsupportedEncodingException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    }
    try {
    unicodebyte = message.getBytes("unicode");
    } catch (UnsupportedEncodingException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    }可以看到unicodebyte错了问题还是:怎么知道哪些字符是非法字符?  
    android里面应该有个表可以查到的,不知道怎么看这个数据
      

  4.   

    /**
         * Decodes one or more bytes. The default behaviour of the converter
         * is stop and report if an error in input stream is encountered. 
         * To set different behaviour use @see CharsetDecoder.onMalformedInput()
         * This  method allows a buffer by buffer conversion of a data stream.  
         * The state of the conversion is saved between calls to convert.  
         * Among other things, this means multibyte input sequences can be 
         * split between calls. If a call to convert results in an Error, the 
         * conversion may be continued by calling convert again with suitably 
         * modified parameters.All conversions should be finished with a call to 
         * the flush method.
         * @param in buffer to decode
         * @param out buffer to populate with decoded result
         * @return result of decoding action. Returns CoderResult.UNDERFLOW if the decoding
         *         action succeeds or more input is needed for completing the decoding action.
         * @stable ICU 2.4
         */
        protected CoderResult decodeLoop(ByteBuffer in,CharBuffer out){        if(!in.hasRemaining()){
                return CoderResult.UNDERFLOW;
            }        data[INPUT_OFFSET] = getArray(in);
            data[OUTPUT_OFFSET]= getArray(out);
            data[INPUT_HELD] = 0;
            
            try{
                /* do the conversion */
                ec=NativeConverter.decode(
                                    converterHandle,  /* Handle to ICU Converter */
                                    input,            /* input array of bytes */
                                    inEnd,            /* last index+1 to be converted */
                                    output,           /* input array of chars */
                                    outEnd,           /* input index+1 to be written */
                                    data,             /* contains data, inOff,outOff */
                                    false             /* donot flush the data */
                                    );到了这里  进不去了