« Back to home

Unicode alchemy with DB2

Recent versions of DB2 have support for Unicode, if your databases are flagged as Unicode-enabled. This is a good thing, so you may have done it without thinking too much about the consequences. After all, i18n is good, right? Unfortunately there are some major snags to be aware of. In particular, in Unicode-enabled databases the length limits in VARCHAR(n) are no longer character length limits. Instead, they are storage length limits.…

Read more »

Getting UTF-8 out of Domino web agents

A common technique for getting XML data out of IBM Lotus Domino is to build an agent which outputs the DXL encoding of a document and call it via HTTP. The code typically looks like this:

Print "Content-type: text/xml"
Dim session As New NotesSession
Dim doc As NotesDocument
[...obtain your data somehow in the variable doc...]
Dim exporter As NotesDXLExporter
Set exporter = session.CreateDXLExporter
exporter.OutputDOCTYPE = False
Dim stream As NotesStream
Set stream = session.CreateStream
Call exporter.SetInput(doc)
Call exporter.SetOutput(stream)
Call exporter.Process
Print stream.ReadText()

However, there’s a subtle error in the above code. The kind of error that can make everything look fine in testing, then cause your integration work to fall over in production.

Read more »