Ticket #1477 (closed enhancement: fixed)
notebook -- make it unicode aware
| Reported by: | was | Owned by: | boothby |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.4.1 |
| Component: | notebook | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by was) (diff)
On Dec 12, 2007 7:48 AM, wrote:
>
> Hi all,
>
> I need to use non-english characters (in comments) in Notebook
> worksheet.
> While working, they're shown w/o problem, but if I save ("download to
> file") worksheet, then close
> SAGE, then open again and load .sws file, sometimes (!) I see just
> unicode codes (like %u4041)
> instead of my chars.
> Strange, but sometimes they're loaded correctly...
> I'm using Sage v 2.8.13 (VMware) under winXP Pro.
>
> Am I missing something?
No, more likely I'm missing something in how that functionality
was implemened. You're probably one of the first ever Russian uses of
Sage, and we have had very little testing of Unicode in Sage.
Hopefully fixing the above is for developers just a
matter of changing a few lines in
SAGE_ROOT/devel/sage/sage/server/noteboook
that relate to loading and saving the file worksheet.txt.
Change History
comment:2 Changed 5 years ago by was
> Could you summarize the situation with rendering problems? Is it as follows:
> (1) When you try to put them in input cells, they get corrupted on load/save.
To be correct, they're replaced by "non-browser" unicode codes (like
%u0440 instead of р )
> (2) Using edit mode, unicode not in {{{}}}'s gets saved just fine.
Yes, as they are NOT processed (as I understand) and get saved "as
is".
> Oh, by the way, when you're entering html in edit mode, you can just do,
> e.g., consider $y^2 = x^3 + \sqrt{x}$ and the formula will get typeset
> using jsmath.
Thanks, can be helpful when writing my materials.
comment:3 Changed 5 years ago by mabshoff
- Summary changed from notebook -- make it unicode aware to [probably fixed?] notebook -- make it unicode aware
Hmm, didn't we fix this by adding UTF-8 support?
Cheers,
Michael
comment:4 Changed 5 years ago by mabshoff
- Summary changed from [probably fixed?] notebook -- make it unicode aware to notebook -- make it unicode aware
comment:5 Changed 4 years ago by mhansen
Sage's support for Unicode and UTF-8 in the notebook is _awful_. It will take a bit of work to fix this. For starters, we should be using encodeURIComponent in the Javascript instead of escape since escape fails miserably for non-ASCII characters.
I'll look into this more once the templating is done. There's too many strings floating as it is.
Note: See
TracTickets for help on using
tickets.
