[請益] 字編碼問題
在程式裡用pdftotext的方式將PDF檔轉成UTF-8的txt文字檔
接著抓出txt裡面的一段文字
$_str = '生日:066年11月28日';
$_str = str_replace("生日:", '', $_str);
$_str = str_replace("年" , '', $_str);
$_str = str_replace("月" , '', $_str);
$_str = str_replace("日" , '', $_str);
echo $_str;
Output:066年1128
我手動複製沒被替換過去的「年」做替換,發現可行,
google到是字元代碼不相同的問題,這個狀況第一次遇到,
想問一下版上大家有哪些經驗,想伸個關鍵字,謝謝。
--
╭────────╮
│請問您為什麼 │ ╴ ╴ ╭───╮
│下定決心拋棄微軟 > εˋ▃ρ ξ─ 3 < 我窮。│
│擁抱自由軟體呢?│ 妓﹀∕  ̄﹀M ╰───╯
╰────────╯ 》 ║
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 203.217.117.113
※ 文章網址: http://www.ptt.cc/bbs/PHP/M.1404087345.A.BCD.html
→
06/30 22:54, , 1F
06/30 22:54, 1F
→
06/30 22:55, , 2F
06/30 22:55, 2F
討論串 (同標題文章)