swfupload上传结束时在IE8和IE10下报错,找不到问题

育儿经验2021-05-15 09:29:35网络

"0|涓娄紶鏂囦欢鎴愬姛锛?是这里导致语法错误?乱码之后丢了结束的双引号?

android的adb下查看sqlite表,中文显示乱码啊,

插入字符的编码和读出时用的编码要一致,就是说:假设,数据库中数据是你通过android代码插入,以GB2312编码格式,如:1<a href="https://www.baidu.com/s?wd=db&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9rju-ujDsrycznWn1PW630AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtdP1f3Pjm1PHD" target="_blank" class="baidu-highlight">db</a>.execSQL("insert into question_tb values(?,?,?,?,?,?,?)",new String(val,"gb2312"));插入到表:1234567891011121314151617"Create table IF NOT EXISTS question_tb(" +"code int," +"is_finished int," +"is_english int,"+"pic_name varchar(64)," +"ans_back <a href="https://www.baidu.com/s?wd=BLOB&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9rju-ujDsrycznWn1PW630AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtdP1f3Pjm1PHD" target="_blank" class="baidu-highlight">BLOB</a>," +"ans_true varchar(64)," +"info int"+")";读出就是:12345678910111213byte[] val = cursor.get<a href="https://www.baidu.com/s?wd=Blob&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9rju-ujDsrycznWn1PW630AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtdP1f3Pjm1PHD" target="_blank" class="baidu-highlight">Blob</a>(cursor.getColumnIndex("ans_back")); String <a href="https://www.baidu.com/s?wd=sn&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9rju-ujDsrycznWn1PW630AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtdP1f3Pjm1PHD" target="_blank" class="baidu-highlight">sn</a>;try { <a href="https://www.baidu.com/s?wd=sn&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9rju-ujDsrycznWn1PW630AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtdP1f3Pjm1PHD" target="_blank" class="baidu-highlight">sn</a> = new String(val,"gb2312");} catch (UnsupportedEncodingException e) {e.printStackTrace();}就是说,插入和读取要么都做转换,要么都不做(android默认UTF-8格式)。

相关推荐

猜你喜欢

大家正在看

换一换