mit der neuen Forumsoftware hab ich Problem mit dem "Subject" der Email.
Ich habe eine Xbase++ / SEE32 Anwendung die mir die "Überschriften" (Header)
vom POP3 Server holt und mir die in einem XbpBrowse anzeigt wo die dann
markiert werden welche SPAM sind und vom POP3 Server gelöscht werden sollen.
Während OE & Co. die "Subject" Zeile lesebar anzeigt, erhalte ich mit meinem
Xbase++ SPAM Blocker nur irgendwas mit UTF-8
das soll heissen : Benachrichtigung über neue Antwort — „Neue Forensoftware“Subject: =?UTF-8?B?QmVuYWNocmljaHRpZ3VuZyDDvGJlciBuZXVlIEFudHdvcnQg4oCUIOKAnk5ldWUg?= =?UTF-8?B?Rm9yZW5zb2Z0d2FyZeKAnA==?=
From: <post@xbaseforum.de>
man kann es auch sehen, bei OE -> Eigenschaften -> Quellcode
hab ich getan, aber ich komme nicht weiter ...Und was Dein Subject anbelangt: Das musst Du umwandeln mit UTF8->ANSI.
Entsprechende Beispiele dazu findest Du in der Alaska-Newsgroup.
Frage : ist Mein Beispiel überhaupt UTF-8 ?
auch scheint mir das die Jungs es eher "andersrum" gebrauchen (deutsch -> blabla)
sodas ich auch mit folgenden nicht klar komme :
Code: Alles auswählen
#INCLUDE "DLL.CH"
PROCEDURE MAIN
LOCAL cUTF8 := "=?UTF-8?B?QmVuYWNocmljaHRpZ3VuZyDDvGJlciBuZXVlIEFudHdvcnQg4oCUIOKAnk5ldWUg?= =?UTF-8?B?Rm9yZW5zb2Z0d2FyZeKAnA==?="
LOCAL cMBtoW
LOCAL cWToMB
LOCAL nWideChars
LOCAL cPlainUnicode
LOCAL nCodepage
LOCAL nBytes
LOCAL cAnsi
/*
Guenter Beyes
Freitag, 10. M㱺 2006 12:10
public.xbase++.generic
Re: UTF-8 conversion
*/
// UTF-8 code-page identifier.
#DEFINE CP_UTF8 65001
/*
hier fängt es schon an ... wie/was/wo identifier
ich möchte UTF-8 -> deutsch
*/
cMBtoW := DllPrepareCall( "kernel32.dll", DLL_STDCALL, "MultiByteToWideChar" )
cWToMB := DllPrepareCall( "kernel32.dll", DLL_STDCALL, "WideCharToMultiByte" )
// First convert UTF-8 to plain Unicode:
// Add string terminator just to be safe.
cUTF8 += chr(0)
// Get number of resulting wide characters.
nWideChars := DllExecuteCall( cMBtoW, CP_UTF8, 0, cUTF8, -1, 0, 0 )
// Provide a sufficient buffer.
cPlainUnicode := space( 2*(nWideChars + 1) )
// Do the conversion.
nWideChars := DllExecuteCall( cMBtoW, CP_UTF8, 0, cUTF8, -1,;
@cPlainUnicode, nWideChars+1 )
// Strip Unicode string terminator.
// (NOT, because it's needed in the next step. )
// cPlainUnicode := left( cPlainUnicode, 2*(nWideChars - 1) )
// Now convert plain Unicode to ANSI,
// using the current ANSI code page:
// Get current ANSI code-page identifier.
nCodepage := DllCall( "kernel32.dll", DLL_STDCALL, "GetACP" )
// Get number of resulting bytes.
nBytes := DllExecuteCall( cWToMB, nCodepage, 0, cPlainUnicode, -1,;
0, 0, 0, 0 )
// Provide a sufficient buffer.
cAnsi := space( nBytes + 1 )
// Do the conversion.
nBytes := DllExecuteCall( cWToMB, nCodePage, 0, cPlainUnicode, -1,;
@cAnsi, nBytes+1, 0, 0 )
// Strip ANSI string terminator.
cAnsi := left( cAnsi, nBytes - 1 )
// Finito.
? cAnsi // -> cUTF8
RETURN
so ich werde es jetzt mal mit Pablos ot4xb versuchen.
... aber trotzdem wüsste ich gerne wie es "funktioniert"