|
|
|
Перекодировка почтовых сообщений KOI8-R <> 1251 и в др
|
|||
|---|---|---|---|
|
#18+
У меня такая проблема! Пользуясь EasyMail я получаю почту в приложении VFP, но если они отправлены через OutLook Express, то как правило в кодировке KOI8-R. И весь русскоязычный текст у меня в приложении отражается криво. VFP не поддерживает KOI8, как быть, перекодировать самой, но как? Подскажите, кто знает, пожалуйста! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.11.2005, 14:08:44 |
|
||
|
Перекодировка почтовых сообщений KOI8-R <> 1251 и в др
|
|||
|---|---|---|---|
|
#18+
Было опубликовано на www.foxclub.ru Function TranslationCP Lparameters nCurrentCodePage, nNewCodePage, cString Declare Integer IsValidCodePage in WIN32API ; integer nCodePage Declare Integer MultiByteToWideChar in WIN32API ; integer CodePage,; integer Flags,; string MultyByteStr,; integer MultiByteStrLen,; string @ WideCharStr,; integer WideCharStrLen Declare Integer WideCharToMultiByte in WIN32API ; integer CodePage,; integer Flags,; string MultyByteStr,; integer MultiByteStrLen,; string @ WideCharStr,; integer WideCharStrLen,; integer ,; integer If IsValidCodePage(nCurrentCodePage) = 0 Error 1914 Return "" EndIf If IsValidCodePage(nNewCodePage) = 0 Error 1914 Return "" EndIf Local WideCharBuf, MultiByteBuf WideCharBuf=Replicate(Chr(0),Len(cString)*2) MultiByteBuf=Replicate(Chr(0),Len(cString)) MultiByteToWideChar; (nCurrentCodePage; ,0; ,cString; ,Len(cString); ,@WideCharBuf; ,Len(WideCharBuf)) WideCharToMultiByte; (nNewCodePage; ,0; ,WideCharBuf; ,Len(WideCharBuf); ,@MultiByteBuf; ,Len(MultiByteBuf); ,0,0) Return MultiByteBuf endFunc ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.11.2005, 14:45:23 |
|
||
|
|

start [/forum/topic.php?fid=41&fpage=290&tid=1592973]: |
0ms |
get settings: |
7ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
4ms |
track hit: |
90ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
29ms |
get tp. blocked users: |
1ms |
| others: | 226ms |
| total: | 390ms |

| 0 / 0 |
