[sage-support] Re: non-english characters in Notebook
On Dec 12, 2007 7:48 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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, you are not missing something. More Sage is 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. I've made this issue a trac ticket: http://trac.sagemath.org/sage_trac/ticket/1477 By the way, did you see http://rnd.cnews.ru/math/news/line/index_science.shtml?2007/12/10/278779 Is this a significant news outlet in Russia? -- William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
William, thanks for reply. For now, I'll try to add encoding instructions to the html in "Edit" mode... As for me, I'm university professor (in electrical engineering field) trying to find non-proprietary tools for my students :-) > By the way, did you see > http://rnd.cnews.ru/math/news/...shtml?2007/12/10/278779 > Is this a significant news outlet in Russia? Thanks for this info. Yes, it's well known tech news source here. This publication can be helpful when talking to directors :-). --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
Well, no luck with "direct" workaround. If I change "%u0441" to "с", it shows correct char *for this only session*, but on save+load, it gets replaced by even more non- english char (like euro sign :-) You're right, this seems caused by how worksheet is saved/loaded. The only way of "indirect" workaround I can think of so far is to load worksheet into html frame and constantly do "%uN -> N;" replacements with Javascript. BTW, how can I add multiple lines comment in Notebook? So far, the 2nd line is discarded. Also, if I create a comment-only section, it's discarded on save/load. I'm just trying to make text-only (no math) block. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
Alex, Excuse me for asking, but if I'm not mistaken, I (end-user) can't do any of these 2 things, right? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
Besides, I don't think the 1st one (meta tag) will work, because "%u" is not standard html representation for unicode char... --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
Not possible to use html+js wrapper. While it works ok with static file (saved as html), with *live* worksheet an error occures: === uncaught exception: Permission denied to get property HTMLDocument.body === However, it's not a problem any more, as now I know how to set pure html sections that are rendered w/o problem with any characters. Thanks, William! --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
On Dec 13, 2007 10:32 AM, greg2k4 <[EMAIL PROTECTED]> wrote: > However, it's not a problem any more, as now I know how to set pure > html sections that are rendered w/o problem with any characters. > Thanks, William! 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. (2) Using edit mode, unicode not in {{{}}}'s gets saved just fine. 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. -- William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
> 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. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
Last addition (just tried to read help :-) input block started with %html can contain only ascii chars. non- english gets replaced by %u as described above. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: non-english characters in Notebook
> input block started with %html can contain only ascii chars. non- > english gets replaced by %u as described above. G, it inserts: inserted text IMHO, very bad practice and should not be recommended. I'd suggest to use html _ourside_of_{{}}_ whenever possible. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---