1

I am using Eclipse Integrated in Lotus Notes IDE.

I am unable to retrieve exact chineese characters for the Document or attachment name of Embedded Object.i.e., Document.getItemValueString(); or EmbeddedObject.getName() instead of chineese characters i am seeing ???.

Please find below code snippet for more information.And let me know is there is away retrieve exact chineese/Russian/Korean/arbic from the document or from attachment name i.e, from EmbeddedObject.getName also please confirm whether the above mentioned issue(representing chineese/Russian/Korean/arbic from the document or from attachment name i.e, from EmbeddedObject.getName ) is actually supported by Lotus Notes 8.5.

Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      Database db = agentContext.getCurrentDatabase();
      Document doc = db.getProfileDocument("TestForm", null);
      String str =doc.getItemValueString("filename");
System.out.println("Doc name sys"+str);

      PrintStream ps = new PrintStream(System.out, true, "UTF-8");

      ps.println("Doc name"+str); 

output is

Doc name sys????
Doc nameä½ å¥½ä½ å¥½

What is the solution?

Enamul Hassan
  • 5,266
  • 23
  • 39
  • 56
  • Try to printStream in a file and open the file, the System.out (I mean the console) may use a font that can't display chinese – Emmanuel Gleizer Jul 07 '15 at 13:14
  • Convert the String str to a byte array using getBytes("UTF-8"). Print the values out as hex (see http://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java). Also do the same using getBytes() - without specifying a charset. Compare the hex strings against the values from a chart of Unicode code points. Or you can download my All Unicode Characters Database from OpenNTF and use that as your reference. http://www.openntf.org/Projects/codebin/codebin.nsf/0/AAB7457D7B8A88F3862576CB0066F84C) – Richard Schwartz Jul 07 '15 at 15:15
  • Also note that simply opening the documents in the All Unicode Characters Database is a good way of checking whether your system has the necessary fonts installed. – Richard Schwartz Jul 07 '15 at 15:16

0 Answers0