[java] อ่านข้อมูลภาษาไทยจาก Text File
มีปัญหาในการอ่านข้อมูลภาษาไทยจาก Text file อ่านมาแล้ว เป็น “??” จากการขอความช่วยเหลือ อ.google ได้ตัวอย่างมาดังนี้
/** * File Name : ReadUTF8Data.java * Created Date : Jul 27, 2010 : 09:37:17 AM */ package com.fun4station.example; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; public class ReadUTF8Data { private static final String FILE_ENCODE = "UTF-8"; public static void main(String[] args) { String data = null; BufferedReader dataIns = null; String file = ""; try { dataIns = new BufferedReader(new InputStreamReader( new FileInputStream(file), FILE_ENCODE)); while ((data = dataIns.readLine()) != null) { System.out.println("Line 1 :" + data); } dataIns.close(); dataIns = null; } catch (IOException e) { e.printStackTrace(); } } }
ซึ่งสามารถใช้ได้ดี ไม่มีปัญหา
right\” href=\”[[\u0025UNESCAPED]][[message_uri]]\” data-sigil=\”touchable m-send-message\”>\u003Cdiv class=\”touchoverflow\”>\u003C\/div>\u003Ci class=\”touched_hide messageIcon img sp_owAC3WqXL6E_3x sx_079487\”>\u003C\/i>\u003Ci class=\”messageIcon touched_show img sp_owAC3WqXL6E_3x sx_079487\”>\u003C\/i>\u003C\/a>”],”z3d+X2″:[“CallButtonTemplate”,”\u003Cdiv class=\”right\”>\u003Cdiv class=\”flyoutListWrap\” data-sigil=\”openable\”>\u003Cdiv class=\”flyoutList\”>\u003Cdiv class=\”flyoutIcon\” data-store=\”{"allowScroll":true}\” data-sigil=\”blocking-touchable\”>\u003Ci class=\”touched_hide img sp_X_8Ch7T9wqM_3x sx_00db67\”>\u003C\/i>\u003Ci class=\”touched_show img sp_X_8Ch7T9wqM_3x sx_bb6986\”>\u003C\/i>\u003C\/div>\u003Cdiv class=\”flyoutMenuWrap opened_show\”>\u003Cdiv class=\”leftShadow\”>\u003Ci class=\”img sp_X_8Ch7T9wqM_3x sx_ffeaca\”>\u003C\/i>\u003C\/div>\u003Cdiv class=\”shadow\”>\u003Ci class=\”img sp_X_8Ch7T9wqM_3x sx_ffeaca\”>\u003C\/i>\u003C\/div>\u003Ci class=\”flyoutArrow img sp_X_8Ch7T9wqM_3x sx_818898\”>\u003C\/i>\u003Cdiv class=\”flyoutMenu nowrap\”>\u003Ca class=\”btn btnI mfss touchable\” role=\”button\” style=\”[[\u0025UNESCAPED]][[call_style]]\” href=\”[[\u0025UNESCAPED]][[call_uri]]\” data-sigil=\”blocking-touchable\”>\u0e42\u0e17\u0e23\u003C\/a>\u003Ca class=\”btn btnI mfss touchable\” role=\”button\” style=\”[[\u0025UNESCAPED]][[sms_style]]\” href=\”[[\u0025UNESCAPED]][[sms_uri]]\” data-sigil=\”blocking-touchable\”>SMS\u003C\/a>\u003C\/div>\u003C\/div>\u003C\/div>\u003C\/div>\u003C\/div>”]}],[]],[“InitMSearchTypeahead”,”main”,[“MSideNavMarauderLogger”
If some one desires expert view concerning blogging after that i advise
him/her to pay a quick visit this website,
Keep up the good job.
Piece of writing writing is also a fun, if you know afterward you can write otherwise
it is complex to write.
I have read so many content about the blogger lovers however this paragraph is genuinely a good piece of
writing, keep it up.