How about counting non ASCII from it ... Checking mere ASCII doesn't help as utf8 it self is combination of characters ... On Nov 25, 2013 11:50 AM, "Karthikeyan V.B" <[email protected]> wrote:
> > > From StackOverflow, > > ------------------------------- > > fgets() can decode UTF-8 encoded files if you use Visual Studio 2005 and > up. Change your code like this: > > > infile = fopen(inname, "r, ccs=UTF-8"); > > > > On Sat, Nov 23, 2013 at 8:25 PM, Nishant Pandey < > [email protected]> wrote: > >> Q) *C program* that reads multiple UTF-8 encoded strings from STDIN (1 >> string per line), count all *non-ascii* characters (ascii characters are >> with ordinal decimal 0 to 127) and print the total non-ascii character >> count to STDOUT (1 number per line). >> >> Contraint : >> >> >> - You cannot use any *wchar.h* service in your program. >> - The UTF-8 strings supplied to you can have *1 or more whitespaces* in >> them. >> - No input string will have a character length greater than*200 >> *(including >> spaces) >> - You will be given multiple lines of input (1 string per line). >> - Input will be limited to UTF-8 encoded strings and will not contain >> any garbage values. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
