[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56072] @documentencoding UTF-8 tag should ove
From: |
Colin Macdonald |
Subject: |
[Octave-bug-tracker] [bug #56072] @documentencoding UTF-8 tag should override __mfile_encoding__ |
Date: |
Thu, 4 Apr 2019 03:10:25 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0 |
URL:
<https://savannah.gnu.org/bugs/?56072>
Summary: @documentencoding UTF-8 tag should override
__mfile_encoding__
Project: GNU Octave
Submitted by: cbm
Submitted on: Thu 04 Apr 2019 07:10:23 AM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
There was a thread about __mfile_encoding__. I didn't follow the whole thing
but I think the gist was that it was something that would come from the host
system.
There is at least one case where we know for sure: if the texinfo in the file
specifies address@hidden UTF-8`.
Thus we should override `__mfile_encoding__` on a file-by-file basis if there
is an explicit address@hidden tag.
In Symbolic, the texinfo is full of UTF-8 unicode chars. This is starting to
work on Windows, as is the unicode-rendered math. Funnily enough, one thing
that doesn't work is the "1×2 matrix" in:
>> [sin(a/2) pi]
ans = (sym 1×2 matrix)
⎡ ⎛a⎞ ⎤
⎢sin⎜─⎟ π⎥
⎣ ⎝2⎠ ⎦
(On Windows, one gets something like "$\tilde{A}--$".
This is because this string is directly written in the @sym/display.m file:
function [s1 s2] = sym_describe(x, unicode_dec)
if (unicode_dec)
- timesstr = '×';
And is thus interpreted by whatever lies __mfile_encoding__ chooses today/on
this OS/with this moon phase. But this is crazy because we just pulled utf-8
texinfo from the top of the very same file...
I plan to workaround this by not having any non-ascii chars in my code:
https://github.com/cbm755/octsympy/issues/941
Although this still leaves `!%` BISTs.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56072>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56072] @documentencoding UTF-8 tag should override __mfile_encoding__,
Colin Macdonald <=