The technical insider of the development of Chinese-based tools that have been dyed with Xi-colored bandao

Source: Internet
Author: User
Tags ultraedit

The day before yesterday, I received a letter from my sister. I want to develop a tool for the Chinese group to translate the text.

 

Requirement Analysis:

Functions
1. It can be automatically saved at intervals (you can add a timer ..)
2. Ignore the hex information starting from each section of the document (similar to 0001ab32, 6 ,). Display original sentence
3. There is a translation box, but when the translation is input to the next sentence, the length of the sentence cannot exceed the original sentence.
4. There is a preview box, because sometimes a sentence is split, it is best to skip the function-v-
& Mengshu jingling 19:57:26
Seemingly difficult -_-
Master♂Luo Yun 19:57:41
4. There is a preview box, because sometimes a sentence is split, it is best to skip the function-v-

 

This article does not involve requirement analysis. For more information, see the subsequent articles in this series.

This article focuses on the development of Chinese tools:

 

The Chinese tool is not like the text used in normal times., Word can not open, it does not matter UltraEdit-32 can be put, but the Chinese is for the software to see, he does not recognize, who has no way!
Text processing becomes a problem ....

 

Experiment: Come with the master
Common Methods: (Microsoft Visual Basic 2005 or 2008 express edition is used below)
There is a RichTextBox Control richtextbox1 on the form.
Two buttons
The following code:

Private sub button#click (byval sender as system. Object, byval e as system. eventargs) handles button1.click
Dim A as new openfiledialog
If a. showdialog = windows. Forms. dialogresult. OK then
Richtextbox1.loadfile (A. filename, richtextboxstreamtype. unicodeplaintext)

End if
End sub

 

Private sub button2_click (byval sender as system. Object, byval e as system. eventargs) handles button2.click
Dim A as new savefiledialog
If a. showdialog = windows. Forms. dialogresult. OK then
Richtextbox1.savefile (A. filename, richtextboxstreamtype. plaintext)

'Ps: Using richtextbox1.savefile (A. filename, richtextboxstreamtype. unicodeplaintext) cannot be read
End if

Test:
Read the Japanese version 0101.yks.txt first, and then save it as B .txt.
Okay, don't worry. Use ultraedit to open two texts:

It seems no exception

However, when you enable hexadecimal editing .......

 

Obviously, the hexadecimal format is different ....

These two documents are not in the same format!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.