octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52681] Bad reading for UTF-8 characters with


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #52681] Bad reading for UTF-8 characters with fscanf()
Date: Thu, 21 Dec 2017 14:40:11 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0

Update of bug #52681 (project octave):

                  Status:                    None => Patch Submitted        
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #10:

I finally found where the read "char" was assigned to a "double" which
ultimately led to the warning that discarded half of the utf-8 characters.
The attached patch casts the "char" to "unsigned char" before the assignment.
With it, the text file from comment #0 is read without errors. 

(file #42699)
    _______________________________________________________

Additional Item Attachment:

File name: bug52681_scanf_utf-8.patch     Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52681>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]