vikasde
vikasde

Reputation: 5751

What kind of char is this and how do I convert it to a text?

What kind of char is this and how do I convert it to a text in c#/vb.net?

alt text

I opened a .dat file in notepad, took a screenshot and attached it here.

Upvotes: 0

Views: 181

Answers (2)

dan04
dan04

Reputation: 90995

Your screenshot looks like the digits "0003" in box. This is a common way to display characters for which a glyph isn't available.

U+0003 is the "END OF TEXT" control character. It's unlikely to occur within a text file, but a ".dat" file might be a mixture of text and binary data.

Upvotes: 1

Mark
Mark

Reputation: 11740

You'll need to use a hex editor to find the exact ASCII code (assuming the file is ASCII, which seems to be an entirely incorrect assumption) that the file contains. It's safe to say that whatever byte sequence is contained in the file is not a printable character in whatever encoding the editor used to open the file, and that is why it used that graphic in place of the actual character.

Upvotes: 0

Related Questions