Other character sets in Mview ...

User e25fe1ac40

27-03-2006 04:35:22

I am interested in using the GB2312 charset (Simplified Chinese) in some Mview displays .... I did a search and found a reference on the forum to changing to the UTF-8 charset ... but could not analogously apply that solution (so far!) to the GB2312 ... is there a way to do this?





Thanks - Manton

ChemAxon a3d59b832c

27-03-2006 05:54:29

Hi Manton,





The following link shows the supported character encodings of Java


(You should use column "Canonical Name for java.io and java.lang API"):





http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html





According to this, you should use the encoding name "EUC_CN" for GB2312.


I hope that helps.





Best regards,


Szabolcs





P.S. I will move this topic under the Marvin forum.

User e25fe1ac40

27-03-2006 20:28:44

Thanks, Szabolcs, for your reply. However, it is not clear to me where this information should go. According to the previous forum article of Sept. 2005, authored by Tamas of ChemAxon (quoting):





To display non-standard character in your html document and in Marvin applets, you should set the *encoding* of the page to utf-8:


*Quote:*


<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">








Insert the above line into the header of your html document.


After that, you can write non-standard characters into your html document.


Marvin can display non-standard characters (like ü) but it does not understand them in html encoded format (like &uuml;).


Thus, you should modify your code like this:


*Quote:*


mview_param("cell0","|../../substances/mol/0001.mol|Gü 1");








Thus, I have tried putting the encodings names (in my case, both GB2312 and EUC_CN) into my HTML header (and also importing into my jsp scripts the files "java.lang.*" and "java.io.*"). I am then able to correctly display the chinese characters within the frame that contains the applet, but not in the marvin view applet itself. [To test, I just pass the character strings directly to the applet as done above, i.e., replacing the "Gü 1" by my chinese encoded strings, obtained from a database.] So it seems to me, there must be an additional step for telling the applet itself which encoding you are using. I've looked in "marvin.js", but saw no place obvious to me to pass this information along to the applet ....





Thanks again, Manton


Szabolcs wrote:
Hi Manton,





The following link shows the supported character encodings of Java


(You should use column "Canonical Name for java.io and java.lang API"):





http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html





According to this, you should use the encoding name "EUC_CN" for GB2312.


I hope that helps.





Best regards,


Szabolcs





P.S. I will move this topic under the Marvin forum.

ChemAxon 7c2d26e5cf

28-03-2006 17:15:29

Hi Manton,


We will check the issue. Can you show me your example?


Until we check it, I suggest you to use UTF-8 characters in applet parameters.

User e25fe1ac40

28-03-2006 19:28:24

Hi Tamas -





I'll enclose the relevant jsp scripts and some additional examples under separate cover, meanwhile, I am still not sure where to use the encoding name in an "applet parameter" -- I don't see an applet parameter relating to character encodings?





Thanks - Manton
Tamas wrote:
Hi Manton,


We will check the issue. Can you show me your example?


Until we check it, I suggest you to use UTF-8 characters in applet parameters.

ChemAxon 7c2d26e5cf

30-03-2006 18:46:44

Thanks for the example.


There is no applet parameter to determine encoding. But I will check how to pass the proper characters to the applet.

ChemAxon 909aee4527

17-03-2008 17:05:46

Hi Manton,





it is fixed in Marvin 5.0.2 coming in the days.


With the following line in html header Chinese characters can be directly used as applet parameters.


Code:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=GB2312">






Kind regards,


Judit