Recent

Author Topic: TEdit and Unicode/UTF8 again  (Read 1790 times)

hy

  • Full Member
  • ***
  • Posts: 214
TEdit and Unicode/UTF8 again
« on: November 15, 2017, 05:49:41 pm »
When entering a string into a TEdit special characters are converted to questionmarks.
Code: [Select]

unit foo;
{...}
   {$MODE OBJFPC}{$J-}
var
    eName : TEdit;
    MyString: string;
begin
{...}
MyString := eName.text;
{...}
end;

If I enter the following string into the TEdit: 'the urbanización registered 23° today'
I get 'the urbanizaci??n registered 23? today'
Debugger shows the same with question marks for eName.FCaption ...
Thanks in Advance
_____
***hy
OS: debian sid(64bit)  [fpc 3.0.4] Lazarus SVN

FTurtle

  • Sr. Member
  • ****
  • Posts: 273
Re: TEdit and Unicode/UTF8 again
« Reply #1 on: November 15, 2017, 06:02:31 pm »
Strings in your module are short strings.
Add {$H+}

hy

  • Full Member
  • ***
  • Posts: 214
Re: TEdit and Unicode/UTF8 again
« Reply #2 on: November 15, 2017, 06:10:04 pm »
thanks I did add $H+ but it is the same
_____
***hy
OS: debian sid(64bit)  [fpc 3.0.4] Lazarus SVN

wp

  • Hero Member
  • *****
  • Posts: 7330
Re: TEdit and Unicode/UTF8 again
« Reply #3 on: November 15, 2017, 06:35:26 pm »
You must upload a small project showing the issue (only pas, lfm, lpr and lpi file, all in one zip). Otherwise it's hard to tell.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

hy

  • Full Member
  • ***
  • Posts: 214
Re: TEdit and Unicode/UTF8 again
« Reply #4 on: November 15, 2017, 07:29:00 pm »
If I strap it down to the minimum it works as expected. This will be getting hard... )-;
_____
***hy
OS: debian sid(64bit)  [fpc 3.0.4] Lazarus SVN

 

TinyPortal © 2005-2018