[sdiy] Program with C code comments in Chinese.. need traductions... SOLVED !

Alan Zhu zxysky222 at gmail.com
Sat Feb 8 19:17:48 CET 2020


Hi,

Glad you figured out how to display chinese characters. Chinese native speaker here so if you got confused by the auto translator just post it and I can help you with that.


Cheers,
Alan


________________________________
From: Synth-diy <synth-diy-bounces at synth-diy.org> on behalf of Jean-Pierre Desrochers <sixcordes at oricom.ca>
Sent: Friday, February 7, 2020 9:48 PM
To: synth-diy at synth-diy.org
Subject: Re: [sdiy] Program with C code comments in Chinese.. need traductions... SOLVED !

I finally found a way to translate these Chinese comments..
I had to install the Chinese language in my PC and use it
As a template page to insert it my Chinese comments..
The characters then change to recognizable ‘Chinese’ types.
I can then put them in translators..
Sorry for interrupting the list..

De : Jean-Pierre Desrochers [mailto:sixcordes at oricom.ca]
Envoyé : 30 janvier 2020 15:34
À : 'Synth-diy at synth-diy.org'
Objet : Program with C code comments in Chinese.. need traductions...


Hi all,
Years ago I  bought a very nice development board
For Microchip controllers. Sold by a Chinese company.
This dev board came up with lots of HiTech C code examples.
The problem is that all the program comments were in Chinese (!!)
So whenever I try to understand some specific code lines
I could not figure out the comments associated to the code line.
I remember I’ve been able in the past to translate these Chinese comments
Using Microsoft Word, but cannot remember how I did it (??)
Here is the kind of code with comments I’m trying to trans late:


void interrupt init1(void)
{
            if(INTF==1)         //ÅжÏÖжϱê־λ
            {
                        b=0x3f;            //ÖжϺó£¬Ç¿Ðн«Á÷Ë®¶¯×÷´ÓÍ·¿ªÊ¼
            }
            INTF=0;             //ÒªÊÖ¹¤Çå³þÖжϱêÖ¾
}


void main(void)
{
            TRISB=0B11111111;            //RBÉèÖÃΪÊä³öÈë
            TRISD=0B00000000;            //RDÉèÖÃΪÊä³ö
            PORTD=0B00000000;       //ÃðµôV0-V7
            RBIE=0;                          //RB¿Úµçƽ±ä»¯ÖжϽûÖ¹
            INTEDG=0;               //ÉèÖÃϽµÑØ´¥·¢ÖжÏ
            INTE=1;                      //ʹÄÜÍⲿÖжÏ
            GIE=1;                  //¿ª·ÅÈ«¾ÖÖжÏ
            while(1)
            {
                        if(++a>10000)    //ÑÓʱ10000¸öÈí¼þÖÜÆÚ£¬·Ç¾«È·¶¨Ê±
                        {
                                   a=0;        //ÇåÁãÒÔ±¸Ï´ÎÖØмÆÊý
                                   b++;        //²½Öè²ÎÊý¼Ó1£¬ÒÔ½øÒ»²½
                        b&=0x3f;    //ÒòΪÎÒÃǶ¨ÒåµÄ±í¸ñ³¤¶ÈΪ64£¬ËùÒÔÕâÀïÐèÒªÏÞÖƲ½Öè²ÎÊýÔÚ0-63¼ä
                                   PORTD=liushui[b];  //¸ù¾Ý²½Öè²ÎÊý²é±í¸ñ£¬½«²é³öµÄ²ÎÊý·ÅÈëÁÙʱ»º³å¼Ä´æÆ÷ÖÐ
                        }
            }
}

I know in this C code the lines are straight forward & evidents
purpose wise but this is just an example.
I think the specific font used in Word  had a very high importance..
I tried many text translators on the web but no chances there.
Anybody have an easy translation way ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20200208/a385e89b/attachment.htm>


More information about the Synth-diy mailing list