Skip to content

[wxStyledTextCtrl] Can not get or filesave "àçéèïō" like text from the editor ctrl. #107

Description

Hello,

first of all, thank you very much for this interesting tool you created : wxPHP.

We considered it for an application for our clients but we unfortunately faced a bug we could not solved or worked around. Indeed, in the wxStyledTextCtrl we could not retrieve the content of the editor with GetText, GetValue (or GetSelectedText after a selection) when the text contains accentuated characters by example : "àçéèïō". It works with "aceio" but with french accentuated characters the value returned is always blank.
The same bug happens with the SaveFile method : the simple text "àçéèïō" properly displayed in the editor view is not saved (the fie is created with an empty content). It works with the text "aceio".
We use Windows 7 and the GetCodePage method of the editor returns the code 65001 which corresponds to a kind of UTF8.
However, the text "àçéèïō" can be selected and copied to the clipboard (method Copy) and retrieved correctly in another editor. Also, we can load the "àçéèïō" text (from a file by example) in the editor with the AddText method and it is correctly displayed in the editor's view.

Is there a setting we should change or some encoding we should define ? Or is it a bug ?
Any workaround ? Or should we just forget about wxPHP ?

In adavance, thanks you.

VisitorQ.

Activity

  1. jgmdev commented on Nov 22, 2015

    @jgmdev
    Member

    Sorry for the delay. Do you have a small code portion that could serve for testing, to see If I can reproduce the behavior under Linux too? Having small testing snippets is a great way of troubleshooting this kind of issues.

  2. mikbox74 commented on Nov 23, 2015

    @mikbox74

    Hello!
    @jgmdev , you can use code sample given the link above. Just copy/paste these symbols into editor area and see console output.
    Or you can modify function from example

        function onCh($e)
        {
            echo $this->scite->GetText();
        }

    to see the problem more clearly.

  3. jgmdev commented on Nov 26, 2015

    @jgmdev
    Member

    Tested on linux and works properly, so it seems the issue only affects window builds, will test that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions