<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div><span style="font-family: arial,helvetica,sans-serif;">Hi All,</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">I am a newbie to Python. I just did some readings on the web</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">and got some basic understanding about the language. I'd like</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">to learn the language by writing some simple programs rather than</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">keep reading books. My first program will convert certain uni-code characters</span><br
style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">(let's say UTF-8) in an RTF file format based on a certain mapping</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">in another RTF file that is called a "RTF Control file". On each line</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">of the Control file, there are 2 tokens separate by a TAB or a space.</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">The first token contains the character that needs to be converted from,</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">and the second character contains the character that needs to be converted to.</span><br style="font-family:
arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;"></span><span style="font-family: arial,helvetica,sans-serif;"><br>The program will write to a new file that contains a new set of mapped characters.<br>If a character form the original file is not found in the Control file, then the program<br>just write the same character to the new file.<br></span><span style="font-family: arial,helvetica,sans-serif;">For an example: The RTF Control file may contain the following lines.</span><br>
<br>
<span style="font-family: arial,helvetica,sans-serif;">â í<br>
ơ ă<br>
ư ổ<br>
<br>
The original RTF file may have something like<br>
tâc mơm thư <br>
<br>
and will be converted to a new RTF file </span><span style="font-family: arial,helvetica,sans-serif;">as follows</span><span style="font-family: arial,helvetica,sans-serif;">.<br>
tíc măm thổ<br>
</span><span style="font-family: arial,helvetica,sans-serif;"><br>Before I start to go into the coding, I would like to get some advice from <br>experienced users/mentors about a quick way to do it.<br><br>Thanks in advance!<br>-Chien Nguyen<br></span><br><br></div></div></body></html>