开发者

Search for unicode text inside Windows XP

Is there a way of searching for unicode characters inside a text file under Windows XP? For example suppose I wish to find text documents with the euro symbol. Although the standard XP search allows me to search for the euro symbol it does not produce any matche开发者_开发问答s when I know they should be at least a few. Wingrep has the same issue. Is there any simple software/setting the I have missed?


The input encoding of the search field (in Windows XP, UTF-16) may not match the encoding of the text file (probably UTF-8).

I haven't used this tool (freeware), but it might work for your needs.


In windows or what ever else system you can find out that is it the document unicode (have a unicode character ) or not ?

To achieve this just use this simpl code, not that this code, written in C# and you should use your own equevalent.

public bool IsUnicode(string str)
{
 int asciiBytesCount = System.Text.Encoding.ASCII.GetByteCount(str);
 int unicodBytesCount = System.Text.Encoding.UTF8.GetByteCount(str);

 if (asciiBytesCount!=unicodBytesCount )
     return true;

 return false;
}

if you do not want to write any code and find out that , is document contain any unicode character just see the document (save) Type.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜