Recent

Author Topic: Lazarus doesn't let me write in spanish áéíóú and ^  (Read 10729 times)

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Lazarus doesn't let me write in spanish áéíóú and ^
« on: February 17, 2023, 08:50:29 pm »
Hi, trying to write the ^ caret I could see I cannot work on IDE, even the tilde letters... like áéíóú, but ñ works!  What can I change on IDE?

PD: Working on Big Sur 11.7.2
« Last Edit: February 17, 2023, 08:52:31 pm by edgarrod71 »

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #1 on: February 17, 2023, 11:41:41 pm »
FPC is not Java, you can't type that.

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #2 on: February 18, 2023, 04:59:15 am »
My first language is Spanish, so I develop using FP in Spanish... not JAVA lol.

it turns that using Lazarus v2.0.12. (I installed it on EL Capitan).  I can use ^ if I want to work with pointers... and it works...
even I can use the strings in Spanish.  and it works too.  So what is it going on with the last version?

Sometimes I need to write strings in Spanish even the comments, but the main reason I need the ^ character is for pointers.

Code: Pascal  [Select][+][-]
  1. type
  2.   TA = array of integer;
  3. function imprime_array(a: TA): string;
  4. var p: ^integer;
  5.   s: string = '';
  6. begin
  7.   p := @a[0];   // Inicialización
  8.   while p^ > 0 do begin  // siempre apuntarás
  9.     s += IntToStr(p^) + #9; // asignaré al final tabulador
  10.     inc(p);             // incrementaría el puntero
  11.   end;
  12.   result := s;  // al final lo devuelvo, qué opinas tú?
  13. end;                                                  
  14.  

In last version of Lazarus these letters are not shown on IDE.  Any ideas how to solve that?
« Last Edit: February 18, 2023, 05:19:34 am by edgarrod71 »

dbannon

  • Hero Member
  • *****
  • Posts: 3558
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #3 on: February 18, 2023, 07:12:27 am »
There is a problem entering extended characters into the Lazarus IDE and several components using the "compose sequence". However, I think that is GTK2 only. See -

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/38454

Are you entering the accented characters directly from a localised keyboard or are you using a compose sequence like trick ?  It does sound a bit like you have a keyboard problem ....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #4 on: February 18, 2023, 04:54:54 pm »
My first language is Spanish, so I develop using FP in Spanish... not JAVA lol.

it turns that using Lazarus v2.0.12. (I installed it on EL Capitan).  I can use ^ if I want to work with pointers... and it works...
even I can use the strings in Spanish.  and it works too.  So what is it going on with the last version?

Sometimes I need to write strings in Spanish even the comments, but the main reason I need the ^ character is for pointers.

Code: Pascal  [Select][+][-]
  1. type
  2.   TA = array of integer;
  3. function imprime_array(a: TA): string;
  4. var p: ^integer;
  5.   s: string = '';
  6. begin
  7.   p := @a[0];   // Inicialización
  8.   while p^ > 0 do begin  // siempre apuntarás
  9.     s += IntToStr(p^) + #9; // asignaré al final tabulador
  10.     inc(p);             // incrementaría el puntero
  11.   end;
  12.   result := s;  // al final lo devuelvo, qué opinas tú?
  13. end;                                                  
  14.  

In last version of Lazarus these letters are not shown on IDE.  Any ideas how to solve that?

My first language is also Spanish but I can't code in Spanish entirely with fpc. If you say comments is another story...

With JAVA you can type almost any character in variables and so on...
« Last Edit: February 18, 2023, 05:04:28 pm by lainz »

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #5 on: February 18, 2023, 05:38:33 pm »
Answering to dbannon.  I have been working with a MacBook Pro using El Capitan and version 2.0.12 of Lazarus.  I decided to install latest version of Lazarus but it cannot run on El Capitan, so I installed on another hard drive Big Sur and I could install latest version.

It turns that in El Capitan I can write anything (i.e. ^ áéíóú ÁÉÍÓÚ Üü, etc) but not in Big Sur with latest version of Lazarus IDE.  I tried to change keyboard localization and went to the terminal to try $LANG settings with no results.  So the problem is the latest IDE on Big sur.  I also work with Visual Studio Code in both OSes and it works neat-ok. 

Answering to lainz, You're not answering adequately, so I must think you didn't understand what the need is.

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #6 on: February 18, 2023, 07:50:06 pm »
Prove me wrong:

Attached picture of word in spanish in variable (coding for me), not comments.

If you can't type is the problem, I understand, sorry for the noise.
« Last Edit: February 18, 2023, 07:53:48 pm by lainz »

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #7 on: February 18, 2023, 09:00:18 pm »
I don't see the usability nor the readability of defining pascal variables in other languages than english, so defining
Code: Pascal  [Select][+][-]
  1. var ñandú = string; ñandú := 'ñoñerías';
is really wrong.

fyi, I've been using pascal since version 3.3.

the main problem is that I cannot write inside the IDE any other character than english ones and it's really strange that I cannot write ^ character on the latest IDE on MAC and Big Sur version!!!! you're using windows, in windows there's no problem!

In El Capitan (MAC) with Lazarus ver. 2.012 it works perfectly, but I need to develop using latest Lazarus version and in Big Sur or Ventura (MAC not windows)

by the way, thank you for your interest in helping... I think the problem relays on the Lazarus IDE developers for OSX


lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #8 on: February 18, 2023, 09:03:49 pm »
I don't see the usability nor the readability of defining pascal variables in other languages than english, so defining
Code: Pascal  [Select][+][-]
  1. var ñandú = string; ñandú := 'ñoñerías';
is really wrong.

Consider I've readed only the title of your post and your first not edited post, is not enough information there, then you added more information for us. So don't get me wrong.

Is not wrong in another Languages, you can type more than in FPC, for that I said Java.

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #9 on: February 18, 2023, 09:14:18 pm »
Java was meant for portability, but Pascal is times faster and clearer than Java, for working reasons I prefer Pascal and C++... tried Java once but it's really slow...

by the way "readed" doesn't exist.

Now that you have more information, how can this topic can be sent to the IDE developers for OSX?  IMHO the problem is on the UTF-8 declarations inside the IDE.

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #10 on: February 18, 2023, 09:18:57 pm »
Java was meant for portability, but Pascal is times faster and clearer than Java, for working reasons I prefer Pascal and C++... tried Java once but it's really slow...

by the way "readed" doesn't exist.

Now that you have more information, how can this topic can be sent to the IDE developers for OSX?  IMHO the problem is on the UTF-8 declarations inside the IDE.

I have macOS macbook pro late 2011. I can`t type too in language Español - ISO in an english keyboard,,, just the ñ

At the left in the forum menu is the bugtracker report there at gitlab

Bogen85

  • Hero Member
  • *****
  • Posts: 703
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #11 on: February 18, 2023, 09:21:13 pm »
While
Code: Pascal  [Select][+][-]
  1. var ñandú: string;
  2. begin
  3.   ñandú := 'ñoñerías áéíóú';
  4.   writeln(ñandú);
  5. end.


is obviously invalid in Free Pascal, the following is not:
Code: Pascal  [Select][+][-]
  1. var nandu: string;
  2. begin
  3.   nandu := 'ñoñerías áéíóú';
  4.   writeln(nandu);
  5. end.


Nor is the following:
Code: Pascal  [Select][+][-]
  1. type
  2.   TstringPtr = ^string;
  3. var
  4.   nandu: string;
  5.   strPtr: TstringPtr;
  6.  
  7. begin
  8.   nandu := 'ñoñerías áéíóú';
  9.   writeln(nandu);
  10.   strPtr := @nandu;
  11.   writeln(strPtr^);
  12. end.

If the latter two can't written in Lazarus, that is a serious problem.


lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #12 on: February 18, 2023, 09:32:30 pm »
I'm not sure in wich conditions can't be typed. Again my keyboard is configured in Español - ISO. So I can't say with other settings.

Edit: If this information works for you, I have MacOS Sierra
« Last Edit: February 18, 2023, 09:36:04 pm by lainz »

Bogen85

  • Hero Member
  • *****
  • Posts: 703
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #13 on: February 18, 2023, 10:01:43 pm »
If the latter two can't written in Lazarus, that is a serious problem.

I can't speak for Lazarus on MacOS (and yes, I'm aware that is what this post is about), I'm just saying Lazarus in General.
I have my keyboard in XFCE4 on Linux set to English Alt-Gr International and I can write all the characters mentioned without any problem, in the majority of applications that are unicode aware, including Lazarus.

This is likely a MacOS issue.

Rant on Mac...
Quote
For what it is worth, when forced to use a Mac (I have one at work) I do everything in Linux VMs and VNC into them... And I use a regular PC keyboard. Basically because on the Mac Side of of things, I have many keyboard issues, this would likely be one of them, but I don't notice...
The above is largely because I'm use to Linux and don't have the patience to get to use MacOS...
End rant on Mac...

That all being said, as the thread title and area suggest, this is specific to Lazarus on MacOS.
But Lazarus should not be preventing these letters from being written.

So my guess this is some sort of Mac configuration issue, but...

@edgarrod71, do other applications let you write these letters correctly? You said Visual Studio works correctly? How about other applications?


circular

  • Hero Member
  • *****
  • Posts: 4450
    • Personal webpage
Re: Lazarus doesn't let me write in spanish áéíóú and ^
« Reply #14 on: February 19, 2023, 12:07:12 am »
I have the same problem on MacOS. Keys that are not directly converted to characters, as ^ ´ and ¨ are not taken into account.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018