0

I have an agent written in Lotuscript (IBM Domino 9.0.1 - Windows 10) that reads records into a DB2 database and writes them to Notes documents. The table in DB2 (Centos OS) contains international names in Varchar fields such as "Łódź". The DB2 database was created as UTF-8 CodePage: 1208 and Domino by its nature supports UNICODE. Unfortunately, the value loaded in the notes document is not "Łódź" as it should be but it is "? Ód?".

How can I import special characters from DB2 in Domino NSF DBs in correct ways? Thank you

To import the table I used the following code taken from OpenNtfs XSnippets:

https://openntf.org/XSnippets.nsf/snippet.xsp?id=db2-run-from-lotusscript-into-notes-form

  • 1
    Find where the codepage conversion is happening. Alter the lotusscript to dump the hex of the received data for the column-concerned to a file or in a dialog-box. If the hex codes differ from what is in the column, then it may be your Db2-client that is using the wrong codepage. Are you aware of the DB2CODEPAGE environment variable for Windows? That might help if it is the Db2-client that is doing the codepage conversion. – mao Nov 07 '18 at 14:59
  • Maybe setting "Text file encoding" to "Other:UTF-8" in Designer-File-Preferences-General-Workspace helps. – Knut Herrmann Nov 07 '18 at 16:27
  • Thanks mao was that setting. – user3794653 Nov 07 '18 at 16:47

1 Answers1

0

Find where the codepage conversion is happening. Alter the lotusscript to dump the hex of the received data for the column-concerned to a file or in a dialog-box. If the hex codes differ from what is in the column, then it may be your Db2-client that is using the wrong codepage. Are you aware of the DB2CODEPAGE environment variable for Windows? That might help if it is the Db2-client that is doing the codepage conversion.

i.e setting environment variable DB2CODEPAGE=1208 may help, although careful testing is required to ensure it does not cause other symptoms that are mentioned online.

mao
  • 11,321
  • 2
  • 13
  • 29
  • 1
    If I recall correctly, LotusScript assumes UTF-16. There's a reference database that I created many years ago posted on OpenNTF. It contains the LMBCS, UTF-8 and UTF-16 values for all Unicode chars. (Well, all that existed at that time.) This can help you interpret the data that you dump as hex. Link to the download is here: https://openntf.org/Projects/codebin/codebin.nsf/CodeByDate/CE6B55B6B4A04A6E862576E10008B911 – Richard Schwartz Nov 08 '18 at 18:29
  • 1
    Here's an example of the data. StackOverflow compresses it all into one line, unfortunately. Just one randomly chosen record: ₠ Unicode UTF16 Hex Value 20 A0 Unicode UTF16 Decimal Value 8352 Unicode UTF8 Value E2 82 A0 Name EURO-CURRENCY SIGN Category Sc Canonical Combining Classes 0 Bi-Directional Category ET Decomposition Mapping Decimal Digit Value DigitValue Numeric Value Mirrored N Name (Unicode 1.0) ISO 10646 Comment Uppercase Mapping Lowercase Mapping Titlecase Mapping LMBCS: 14 20 A0 – Richard Schwartz Nov 08 '18 at 18:29