定義一個(gè)char c = '你好';輸出其在 utf-8 編碼模式下的長(zhǎng)度;int length = String.valueOf(c).getBytes("UTF-8").length;