Suppir Posted December 2, 2009 Share Posted December 2, 2009 (edited) Hello! I'm using the code: $Text = _GUICtrlRichEdit_StreamToVar($hRichEdit) # this replace is working $Text = StringRegExpReplace($Text, "some latin characters", "some latin characters") # this replace is not working! $Text = StringRegExpReplace($Text, "some cyrillic characters", "some cyrillic characters") _GuiCtrlRichEdit_SetText($hRichEdit, "") _GUICtrlRichEdit_StreamFromVar($hRichEdit, $Text) I'm getting my cyrillic characters from the file with ANSI encoding (CP-1251). They are displayed in richedit correctly, but the replace does now work I think the problem is in _GUICtrlRichEdit_StreamToVar() function. Edited December 2, 2009 by Suppir Link to comment Share on other sites More sharing options...
KaFu Posted December 2, 2009 Share Posted December 2, 2009 (edited) Maybe this works? $Text = _GUICtrlRichEdit_StreamToVar($hRichEdit,True,True,$SF_UNICODE) Edit: No, it doesnt seem so , I'll take a deeper look. Edited December 2, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Suppir Posted December 2, 2009 Author Share Posted December 2, 2009 (edited) Maybe this works?$Text = _GUICtrlRichEdit_StreamToVar($hRichEdit,True,True,$SF_UNICODE)It returns "False" It is possible to write $iCodePage in parametres, but I do not understand how to do it correctly.It is a kind of magic. If I use $Text = _GUICtrlRichEdit_GetCtrlText($hRichEdit)then cyrillic replaces correctly. But _GUICtrlRichEdit_GetCtrlText() can not transfer MS Word' tables safely.If I use $Text = _GUICtrlRichEdit_StreamToVar($hRichEdit)then MS Word' tables transferes safely, but replaces in cyrillic do not work! Edited December 2, 2009 by Suppir Link to comment Share on other sites More sharing options...
Suppir Posted December 3, 2009 Author Share Posted December 3, 2009 Maybe somebody knows - is there another UDF that support RichEdit functions (formating, fonts & tables)? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now