Do we have a purebasic setting to treat all string as ASCII not unicode?
I have a bit of a problem to exchange data between PB and Scintilla
Scintilla and string in unicode problem
Re: Scintilla and string in unicode problem
No.
Only if you use an old version of PB
But you can always use UTF8() or ASCII() o convert the unicode string from PB.
Only if you use an old version of PB
But you can always use UTF8() or ASCII() o convert the unicode string from PB.
Re: Scintilla and string in unicode problem
Switching encoding
conversion to another encoding
My_Notepad_Sci
Code: Select all
ScintillaSendMessage(#SciGadget, #SCI_SETCODEPAGE, #SC_CHARSET_ANSI)
ScintillaSendMessage(#SciGadget, #SCI_STYLESETCHARACTERSET, 0, #SC_CHARSET_CYRILLIC)Code: Select all
*Buffer = UTF8(PeekS(*mem, -1, #PB_Ascii))
*Buffer = Ascii(PeekS(*mem, -1, #PB_UTF8))
Import "user32.lib"
; OemToCharBuffA(*Buff,*Buff1,SizeBuff)
CharToOemBuffA(*Buff,*Buff1,SizeBuff)
EndImport
CharToOemBuffA(*Buffer, *Buffer, txtLen)Re: Scintilla and string in unicode problem
Thank you @infratec and @AZJIO


