help-octave
[Top][All Lists]
Advanced

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

Re: [help-octave] Re: utf8 does not appear to work for function document


From: Alan W. Irwin
Subject: Re: [help-octave] Re: utf8 does not appear to work for function documentation strings generated with texinfo
Date: Wed, 26 Mar 2014 12:13:17 -0700 (PDT)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

To Pascal and Mike:

You guys have shown the issue is with fwrite.

So I have prepared a simple test case of the fwrite problem
for a (future) bug report.

function test_fwrite_utf8
fid = fopen("test.out", "w")
fwrite(fid, "The unicode character, ≥, is output\n")
endfunction

That creates the following file:

address@hidden> od -a test.out
0000000   T   h   e  sp   u   n   i   c   o   d   e  sp   c   h   a   r
0000020   a   c   t   e   r   ,  sp nul nul nul   ,  sp   i   s  sp   o
0000040   u   t   p   u   t  nl
0000046

The default precision for fwrite (according to the documentation of
that function) is uchar.  I believe that would work if the Octave type
of the utf8 string, "The unicode character, ≥, is output\n" is also uchar
since all that is needed here is to transmit the bytes of that string
unmolested to the output file.

So is the problem that the Octave utf8 string does not have a uchar
type?  Or does the fwrite built-in have some unnecessary filtering in
place to zero bytes with a non-zero eighth bit (i.e., non-ascii utf8
bytes)?

I am pretty much an octave newbie so it would be good to obtain
agreement here on what the exact problem is before I create
the requested bug report.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



reply via email to

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