Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-22 Thread Jussi Lahtinen
Len() returns length in bytes and String.Len() returns length in characters. Use latter for UTF-8 strings. See the documentation. > sText = String.Mid(PrintedTextBox.Text, 1, String.Len(PrintedTextBox)) I assume you mean: sText = String.Mid(PrintedTextBox.Text, 1, String.Len(PrintedTextBox.Text))

Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-22 Thread John Rose
Jussi, I spoke too soon. There seems to be one problem with having non-ASCII characters entered into a TextBox. If I make a string variable (sText in my attached Test project) equal to the Text property of the TextBox (PrintedTextBox.Text in my Test project), then the string variable needs to have

Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-18 Thread John Rose
Jussi, Since you are top posting, I shall also top post: hopefully, it won't start another long discussion. Thanks for the suggestion about using String methods. The Test app now works properly using the String methods. Also, the = and &= operators work OK for strings containing non-ASCII charact

Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-17 Thread Jussi Lahtinen
Oh I missed you are using Mid() function, it is only for ASCII characters, use String.Mid() instead. Jussi On Tue, Mar 17, 2015 at 4:33 PM, John Rose wrote: > On 17/03/15 13:33, Jussi Lahtinen wrote: > > Maybe the console takes only ASCII characters? > > > > > > Jussi > > > > On Tue, Mar 17, 2

Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-17 Thread John Rose
On 17/03/15 13:33, Jussi Lahtinen wrote: > Maybe the console takes only ASCII characters? > > > Jussi > > On Tue, Mar 17, 2015 at 3:00 PM, John Rose > wrote: > >> When entering a £ character (i.e. the British pound symbol not the >> American one) into a TextArea or TextBox, it seems to be 'interpr

Re: [Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-17 Thread Jussi Lahtinen
Maybe the console takes only ASCII characters? Jussi On Tue, Mar 17, 2015 at 3:00 PM, John Rose wrote: > When entering a £ character (i.e. the British pound symbol not the > American one) into a TextArea or TextBox, it seems to be 'interpreted' > as a funny looking question mark (i.e. sort of

[Gambas-user] Bizarre results when entering a £ symbol into a TextArea or TextBox

2015-03-17 Thread John Rose
When entering a £ character (i.e. the British pound symbol not the American one) into a TextArea or TextBox, it seems to be 'interpreted' as a funny looking question mark (i.e. sort of reverse black & white) when it's shown on the Console using a Print statement (actioned in a Change event). I wond