I'm not sure this is relevant because I've always been a bit confused on this
subject. But I put a lot of sweat equity into putting an Angstrom symbol into
an echo a while back. I'll paste the JavaScript function for this below:
function doVdw() {
var vdw = "echo Calculating...;delay 1;select *;isosurface select {*}
resolution 6 MOLECULAR area;isosurface translucent;delay 2;var x = \"vdw
surface area = \" + isosurfaceArea[0] % 0 + \" \u212B<sup>2</sup>\";echo @x";
doClean();
jmolScript(vdw);
}
The relevant snippet is at the end of the var vwd = declaration. I arrived at
this by more trial and error than I care to remember.
Otis
--
Otis Rothenberger
o...@chemagic.com
http://chemagic.com
On Mar 11, 2012, at 4:45 PM, Robert Hanson wrote:
> examples?
>
> 2012/3/11 Angel Herráez <angel.herr...@uah.es>
> Dear users
> I'd like to know if any on you has experience with displaying Unicode
> characters in Jmol
> echos.
> I have succesfully used single characters some times, using the \u notation.
> But what I need
> now is to enter from keyboard strings that include accented letters in a
> script file and have
> them properly displayed inside Jmol.
>
> Test 1:
> I have an html file, encoded as iso-8859-1, and a JmolScript file, encoded
> also as "Western
> Europe" (the default in Windows, may be the same as ANSI but I'm not sure).
> This works fine and the accented characters display correctly in the applet.
>
> Test 2:
> I wanted to switch to Unicode UTF-8 (as the files will be run from a Mac I
> thought this was a
> better option, since AFAIK Unicode is the default in MacOS).
> So I changed the html file to use Unicode UTF-8 (also declared as such in the
> meta tag) and
> saved it as such. I converted and re-saved the script file as UTF-8 too
> (without BOM).
> Now Jmol displays funny characters instead of the proper accented letters.
>
> I was assuming that the applet would receive whatever text based on the
> coding of the file
> and the coding/charset declaration of the webpage.
> I will appreciate any hints.
> Thanks
>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users