Recent

Author Topic: Spanish characters  (Read 3396 times)

katfo

  • New Member
  • *
  • Posts: 39
Spanish characters
« on: May 26, 2017, 08:32:33 am »
Hello all

I am a Windows 10 user and have a Finnish keyboard. I have done a simple vocabulary testing program for Spanish language. It works OK if the word contains no Spanish special characters. But when I need to write a Spanish character, say ñ, in the edit box, I have to press first ALT GR and ~ simultaneously and after that the n character.

My program watches every character that I write. If it detects an error, it signals it right away and I can correct it quickly. The problem is what to do in these special cases, which are á, é, í, ó, ú, ü, ñ, ¿, ¡.

Thanks in advance for your advice. 
« Last Edit: May 26, 2017, 08:39:59 am by katfo »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Spanish characters
« Reply #1 on: May 26, 2017, 09:39:22 am »
Not sure, but since you're using Windows may be your program isn't using UTF-8 but ISO-8859-15.  I am Spanish and I had problems importing data from an old Palm device because it used ISO-8859-15 instead of ISO-8859-1 or UTF-8.   Actually Wikipedia says ISO-8859-15 supports Spanish but it actually doesn't (or may be it failed because my Linux uses UTF-8 and there's a conflict with ISO-8859-15?  I don't know.  Character encoding was always a mistery to myself).
« Last Edit: May 26, 2017, 09:49:33 am by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Spanish characters
« Reply #2 on: May 26, 2017, 10:04:45 am »
The problem is what to do in these special cases, which are á, é, í, ó, ú, ü, ñ
They can be entered using the Finnish keyboard. Make your program react only to characters entered, so a Alt-Gr + accent key does not affect it.

Quote
¿, ¡
I don't know how to get those from the keyboard. Are they needed for vocabulary testing?
« Last Edit: May 26, 2017, 10:10:03 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Spanish characters
« Reply #3 on: May 26, 2017, 01:39:07 pm »
¿, ¡
I don't know how to get those from the keyboard. Are they needed for vocabulary testing?
No, they aren't.  They're used to mark the starting of a question or an exclamation.

Quote
¡Hola! ¿Qué haces? -> Hello! What do you do?
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Spanish characters
« Reply #4 on: May 26, 2017, 01:54:12 pm »
No, they aren't.  They're used to mark the starting of a question or an exclamation.
Quote
¡Hola! ¿Qué haces? -> Hello! What do you do?
Lo sé. Comprendo un poco de Español. :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

bylaardt

  • Sr. Member
  • ****
  • Posts: 309
Re: Spanish characters
« Reply #5 on: May 27, 2017, 04:31:03 am »
My program watches every character that I write. 
Which event was assigned? ( ¿Qué evento usaste? )
OnKeyPress?
OnKeyDown?

katfo

  • New Member
  • *
  • Posts: 39
Re: Spanish characters
« Reply #6 on: May 28, 2017, 09:21:18 am »
Thank you again. I have been away some days and not been able to answer. Yes I used OnKeyPress. I did solve my problem using JuhaManninen’s advice. At the same time I made some other changes which led to minor consequences which I still have to iron out.

Before I started this simple program I searched Internet for similar freeware programs. I didn’t find many but instead of those there were those apps all around. I wonder where are the “old fashioned” computer programs. Is there a secret place for them somewhere? Have people thrown away their computers and moved to mobile phones and tablets? Just wondering.

 

TinyPortal © 2005-2018