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: CdeMills
Subject: Re: [help-octave] Re: utf8 does not appear to work for function documentation strings generated with texinfo
Date: Thu, 27 Mar 2014 02:22:05 -0700 (PDT)

Mike Miller wrote
> If you try
> 
>   fwrite (fid, "The unicode character, ≥, is output\n", "schar");
> 
> or
> 
>   fwrite (fid, double("The unicode character, ≥, is output\n"));

Mike,
"char" should be better. From the C++ standard definition:

Plain char, signed char, and unsigned char are three distinct types. A char,
a signed char, and an unsigned char occupy the same amount of storage and
have the same alignment requirements (basic.types); that is, they have the
same object representation. For character types, all bits of the object
representation participate in the value representation. For unsigned
character types, all possible bit patterns of the value representation
represent numbers. These requirements do not hold for other types. In any
particular implementation, a plain char object can take on either the same
values as a signed char or an unsigned char; which one is
implementation-defined.

For a "plain char", all bits participate to the representation; which is
what we require. On the same example, it works too.

This open another issue: I spotted other cases of two-arguments fwrite in
the source:

scripts/image/imread.m:%!   fwrite (fid, vpng); 
scripts/pkg/private/create_pkgadddel.m:      fwrite (instfid, extract_pkg
(nam
, ['^[#%][#%]* *' nm ': *(.*)$']));

The first should be tested.
The second implies that package name should not contain exotic characters,
which is probably a good thing.

Regards

Pascal




--
View this message in context: 
http://octave.1599824.n4.nabble.com/utf8-does-not-appear-to-work-for-function-documentation-strings-generated-with-texinfo-tp4663317p4663332.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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