this way only helps in linux but when i use in windows with utf-8 encoded
input file for reading characters i cant do it , secondly how to count non
ascii characters from utf-8 string , any one is having any idea on this ?
On Mon, Nov 25, 2013 at 11:50 AM, Karthikeyan V.B
is this what you are asking:
#includestdio.h
#includestring.h
/* MASK to check the numebr of BYTES character is using */
#define ASCII_BYTE 0x80
#define TWO_BYTE 0xC0
#define THREE_BYTES 0xE0
#define FOUR_BYTES 0xF0
#define FIVE_BYTES 0xF8
#define SIX_BYTES 0xFC
#define MASK_BYTE 0xFF
#define
The Code is Awsome pradeep except few things :
1) the output is coming wrong in 2 cases : a) x√ab c counting non-ascii as
2 it should be 1
b)ɖ Ɛ
counting non-ascii as 4 it should be 2.
On Tue, Nov 26, 2013 at 7:57 PM, Pradeep Dubey
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 kartmu...@gmail.com wrote:
From StackOverflow,
---
fgets() can decode UTF-8 encoded files if
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
nishant.bits.me...@gmail.com wrote:
Q) *C
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