Search code examples
regexvb.netnotepad++control-charactersprogrammers-notepad

I see a character called xDB on notepad++. What character is this?


What is this character

All I really need to know is what is this character. I have not seen anything like this before.

How do i remove this using Vb.net:

data = data.Replace(Chr(???????), "")

Is there a specific control character decimal number or something to this character that i can use in place of ?? Please help.

I tried looking up all the html, ascii and the regex languages to find this character but i did not find this anywhere.


Solution

  • To prevent possible bugs related to the encoding of your source files, you should use a hex editor (such as this Notepad++ plugin) to find the hexadecimal code of the character, then use that to reference the character in your code:

    data = data.Replace((char)0xDB, "")
    

    as opposed to:

    data = data.Replace("Û", "")
    

    Note: In this case the hex editor is unnecessary because xDB is already a hex code, but other control characters, such as CR and LF, are not displayed as their hex values [in Notepad++].