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!