我使用 dart_big5: 這個 package
https://pub.dev/packages/dart_big5
elements[0]["title"] 抓自一個 big5 編碼的網頁
code:
var input = elements[0]["title"];
print("input="+input);
String output = utf8.decode(big5.encode(input), allowMalformed: true);
print("output="+output);
輸出:
input=5-2 »y¨¥½s½X
output=5-2
奇怪output沒法正常顯示中文?
請高手指教謝謝
---
ans:
big5.decode(elements[0]["title"].codeUnits);

X