|
From: | David Grundberg |
Subject: | Re: fscanf and special characters |
Date: | Tue, 22 Jun 2010 09:47:21 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
On 06/22/2010 09:41 AM, CdeMills wrote:
Hello, while reading a file with in = fscanf(fid, "%c"); I got the warning message "range error for conversion to character value", because the file starts with, in hex, "0xEF 0xEB 0xBF" whose ascii names are
Aren't those bytes the UTF-16 endian magic code? Try converting the file to UTF-8 using iconv.
David
[Prev in Thread] | Current Thread | [Next in Thread] |