C How to read a text file 50

Updated on technology 2024-06-11
5 answers
  1. Anonymous users2024-02-11

    Just specify the appropriate encoding methodThe .net class library automatically recognizes Chinese or English (single or double byte).

    It is recommended to use this to indicate the default encoding scheme of the operating system, and it is best not to specify the encoding scheme for your own assertions, as you may be dealing with various versions of the Windows operating system.

    Generally speaking, a single byte is an ASCII code, and such encoding ranges from 0 to 127 If converted to binary, the highest bit is always zero.

    For example, the binary of 127 of the ASC code is: 01111111

    In a double-byte encoding scheme, the highest bit is always 1

    For example, the binary of the word "δΈ­" is: 11010110 11010000

    Therefore, the text software is to correctly identify the "single word" and "double word" through the feature I mentioned above, in addition to preventing the problem of "bad words", that is, a large section of text will not be read correctly because of a bad word.

    PS: You can use the UltraEdit "binary" way to view, use the hexadecimal display in Ultraedit, and use the Windows calculator to convert the binary display mode, so it's intuitive (look at -> scientific, and then you can switch back and forth between hexadecimal and binary).

  2. Anonymous users2024-02-10

    string path = + "\\";

    reader = new ,

    So you can put it in and. exe a folder, but also put a textbox1 on the form.

  3. Anonymous users2024-02-09

    You can read Chinese.

  4. Anonymous users2024-02-08

    Adobe PDF Reader controls are used to display PDF documents in Winform. Here's how to do it:

    1) Prerequisites.

    2) Create a new "Windows Forms Application" project in Visual Studio.

    3) Right-click on the toolbox -- > select --com component -- > Adobe PDF Reader

    4) Place an Adobe PDF Reader control and a Button control on Form 1.

    5) form1 form**.

    6) Running effect.

    The program starts. Click on "Open PDF Document." button to display a dialog box.

    Open and display the PDF document.

  5. Anonymous users2024-02-07

    With Zhuozheng office components, pure controls, it is very easy to open and display word documents in web pages.

Related questions
10 answers2024-06-11

Here's how to solve it:

1. Open Excel to create a new worksheet, click the "Data" tab in the menu bar of Excel, select "From Text", find the text file you want to import in the pop-up dialog box, and click "OK". >>>More

7 answers2024-06-11

Text document (text file): A file that can be opened with a program such as Notepad to view the clear code, usually with a name extension. txt .log .ini .. >>>More

8 answers2024-06-11

Without the slip 101 template, you can't write it well according to the content structure of the document. It's better to paste the back part of the original text in its entirety. >>>More

12 answers2024-06-11

You use the variable path as the absolute path of the file, and you have to change its value every time, and the location of your file remains the same, so of course you can't read the file. >>>More

14 answers2024-06-11

Yeti Translation Software (CAT) - Simple, fast and practical, it is an efficient tool for translators! >>>More