问题
I have a text file which shows a Line Break in UltraEdit if we replace a special character in text file manually it works fine. Unknown Line Break. I have to change it manually and then process the files.
Please let me know some way how to remove all occurrences of this character with VB.Net code.
If I replace ♀ in UltraEdit, it replaces line break with my desired string. But in my VB string I cannot use this character or line break.
回答1:
The character you have in your file is the form-feed character usually used as control character for a page break.
In UltraEdit in Page Setup configuration dialog (a printing related dialog) there is the option Page break code which has by default the decimal value 12 (hexadecimal 0C) which is the form-feed character.
A page break can be displayed in UltraEdit with a horizontal line across the document window on enabling Show Page Breaks as Lines in menu/ribbon View.
The form-feed character can be removed in UltraEdit with searching for ^b
on using a normal, non regular expression or an UltraEdit regular expression replace, or with searching for \f
on using a Unix or Perl regular expression replace.
In VB.Net code ChrW(12)
can be used to reference the form-feed control character as suggested already by Hans Passant.
来源:https://stackoverflow.com/questions/38662676/how-to-remove-unknown-line-break-special-character-in-text-file