Regarding (only) the first question: your intended base64 representation of the string requires that the string is encoded in UTF-8. So, in VFP9:
LOCAL Source AS String, Target AS String
m.Source = "Polyfon zwitschernd aßen Mäxchens Vögel Rüben, Joghurt und Quark"
m.Target = "UG9seWZvbiB6d2l0c2NoZXJuZCBhw59lbiBNw6R4Y2hlbnMgVsO2Z2VsIFLDvGJlbiwgSm9naHVydCB1bmQgUXVhcms="
CLEAR
? STRCONV(m.Source, 13) == m.Target ? STRCONV(STRCONV(m.Source, 9), 13) == m.Target
On Tue, Nov 7, 2023 at 8:10 AM Dr. Joerg Arand < joerg.arand@med.uni-tuebingen.de> wrote:
Hi All,
I have 2 questions:
- Base64
I want to insert base64 encrypted data (PDF/DOCX) into a HL7 message. My first idea was to use STRconvert. But during the first test I noticed the following problem. The text Polyfon zwitschernd aßen Mäxchens Vögel Rüben, Joghurt und Quark should be in Base64.
UG9seWZvbiB6d2l0c2NoZXJuZCBhw59lbiBNw6R4Y2hlbnMgVsO2Z2VsIFLDvGJlbiwgSm9naHVydCB1bmQgUXVhcms= But Foxpro ( strconv(lcText,13) ) returns
UG9seWZvbiB6d2l0c2NoZXJuZCBh32VuIE3keGNoZW5zIFb2Z2VsIFL8YmVuLCBKb2dodXJ0IHVuZCBRdWFyaw==
The problem seems to be in the letter "ß". Without ß the encoding works. I know I could also use e.g. Chilcat, but I would prefer to use internal Foxpro functions. Does anyone have an idea?
- Excel Automation
I want to insert data into a formatted Excel sheet . At the moment I write the data into the cells using OLE
....Cells(xy).value= xyz This works but is very slow. Is there a way to insert data from Foxpro e.g. into a Range object and save time?
Thanks,
Dr. Jörg Arand
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]