On Thu, 23 Mar 2006 18:32:59 +0100
Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Am Donnerstag, den 23.03.2006, 11:42 +0200 schrieb Graeme Geldenhuys:
> > Hi,
> >
> > I have a CharaterMap dialog, which builds a string depending what the
> > user clicks. This string can be accessed via a string property
> > "property SelectedChars: string ..."
> >
> > After the user closes the CharacterMap dialog and before I free it, I
> > am trying to read the SelectedChars property into a TEdit.Text. If
> > the user selected characters smaller then Char(128) it works. If the
> > string contains Char(128) or higher, it returns a string, but I am
> > unable to display it in a TEdit, even though they where displayed it a
> > TEdit in the CharacterMap dialog.
> >
> > I added the "s" variable so I could see what gets return while running
> > inside the IDE.
> > eg:
> > s = #169'a' <<== Tooltip evaluation shows
> > this
> >
> > After the dialog closes the edPassword.Text shows nothing when it
> > should actually show the copyright sign with the letter a.
> >
> > --------------------------------------
> > procedure TLoginForm.btnCharMapClick(Sender: TObject);
> > var
> > frm: TfrmCharMap;
> > s: string;
> > begin
> > frm := TfrmCharMap.Create(nil);
> > try
> > frm.ShowInsert := True;
> > frm.ShowModal;
> > if frm.ModalResult = mrOK then
> > begin
> > s := frm.SelectedChars;
> > edPassword.Text := s;
> > end;
> > finally
> > frm.Free;
> > end;
> > end;
> > ---------------------------------------
>
>
> If you are doing this on newer UNIX, note that that uses UTF-8 encoding
> where a single character can span 1..infinite bytes.
'infinite' = 4.
See LCLProc for some UTF8 functions.
> So your SelectedChars should be a TStringList instead :)
A string will be enough in this case.
Can you send the TfrmCharMap source?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives