This question already has an answer here:
- sed Match character range 2 answers
This is the content of a text file, and I want to only keep BMP.
这是无效的字符 𡛂 这是正常的字符 哈
In the How to remove non UTF-8 characters from text file , I find there is a solution, but it doesn't work here.
iconv -f utf-8 -t utf-8 -c test.txt
The utf-8 of 𡛂 is F0A19B82 (located in
CJK Unified Ideographs Extension B), utf-8 of 哈 is E59388（located in
CJK Unified Ideographs).
If I want to delete all characters(the size greater than 3 Bytes) like 𡛂 in text file , how to do it?