# TextEditor messing up characters?

**URL:** <https://forum.juce.com/t/texteditor-messing-up-characters/7489>\
**Category:** General JUCE discussion\
**Created:** [September 22, 2011, 7:21am UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489 "2011-09-22T07:21:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [September 22, 2011, 7:21am UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/1 "2011-09-22T07:21:26Z")

</div>

When I enter the following string “¤¤¤¤¤¤¤¤” into a TextEditor, the string I get back from TextEditor::getText() is “Â¤Â¤Â¤Â¤Â¤Â¤Â¤Â¤” . Since I use the TE for password entry that completely FU the following MD5 hash. Why is there extra chars in the returned string?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [September 22, 2011, 10:22am UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/2 "2011-09-22T10:22:16Z")

</div>

Hmm… can’t reproduce this on the mac… Pasting the string above into the juce demo all seems fine AFAICT ?

---

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [September 22, 2011, 11:56am UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/3 "2011-09-22T11:56:12Z")

</div>

> [@jules](#):
>
> Hmm… can’t reproduce this on the mac… Pasting the string above into the juce demo all seems fine AFAICT ?

This is on Windows (Vista). How do you mean it works fine in the demo ? How can you/I tell ? Are you looking at what TextEditor::getText() returns ? In the TextEditor itself it looks fine.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [September 22, 2011, 12:53pm UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/4 "2011-09-22T12:53:20Z")

</div>

Yeah, I hacked in a DBG to make all TextEditors print out their getText() when changed. It printed the correct string when I tried it.

---

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [September 22, 2011, 1:26pm UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/5 "2011-09-22T13:26:09Z")

</div>

> [@jules](#):
>
> Yeah, I hacked in a DBG to make all TextEditors print out their getText() when changed. It printed the correct string when I tried it.

Ok, you did try on Windows aswell, yes ?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [September 22, 2011, 2:12pm UTC](https://forum.juce.com/t/texteditor-messing-up-characters/7489/6 "2011-09-22T14:12:01Z")

</div>

Not yet. Can’t think why it’d be platform specific though, unless the win32 keyboard handler is inserting those extra characters invisibly or something weird…
