exporting text from word

I have macro in word which calls a procedure in a dll written in delphi.
Macro passes some text from active document, procedure in dll does the work
and sends the result back.
It works fine - only in English. When I choose any other keyboard layout
(say Russian) I can't get the extended unicode characters.
What's wrong?