Index > Scribe > Unicode/UTF problem in GnuPGP plugin
Author/Date Unicode/UTF problem in GnuPGP plugin
16/07/2008 11:31am
Hi Fret,

I found the following problem in the GnuPGP plugin when executed on european systems (Windows code page 1252).

If gpg.exe returns a decrypted file with this content "This is a test char ''.", it will be encoded using "windows-1252" resulting in:

54 68 69 73 20 69 73 20-61 20 74 65 73 74 20 63   This is a test c
68 61 72 3A 20 27 E4 27-2E                        har: '.'.

The GnuPGP plugin loads the output of GnuPGP by using "ReadTextFile()" and iScribe further processes it - assuming it is UTF-8 encoded. But it isn't. The character "0xE4" needs first to be converted into "0xC3 0xA4" - as specified in UTF-8.

Converting the buffer by using LgiNewConvertCp() from "windows-1252" to "utf-8" does the trick, but it is not called from the plugin...

I also tried to recompile the LGI.DLL with a modified "ReadTextFile()" method, but I failed, because iScribe 1.90 seems no longer compatible with version 3.02 of the LGI sources.