Recent

Author Topic: Problem displaying ¿ symbol  (Read 3656 times)

Ricardo T.

  • New Member
  • *
  • Posts: 13
Problem displaying ¿ symbol
« on: October 04, 2018, 08:51:47 pm »
Hello World!  :D

Ok,so my First language is Spanish,and in Spanish when writing a question we use the symbols ¿ and ?

example:  '¿ question ?', last night  i was writing some code using the write,writeln functions to display some
questions in Spanish but when using the '¿' symbol in the string and running the program it displays some
weird symbol instead of the '¿'.  :(

The rest of the text and the '?' are shown right,is only the '¿' that looks weird.

am i missing something?

Thanks.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem displaying ¿ symbol
« Reply #1 on: October 04, 2018, 10:30:12 pm »
When asking questions, it's good practice to specify which version of FPC/Lazarus you're using, under which and which version of OS, steps to reproduce the fail, etc.

That said, your problem probably arises because a string codification conflict between Lazarus/FPC (default UTF 8 ) and your OS configuration. Look in FPC Unicode support, Unicode suport in Lazarus or search in these pages: Wiki Category: Unicode to learn more.
« Last Edit: October 04, 2018, 10:37:46 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Ricardo T.

  • New Member
  • *
  • Posts: 13
Re: Problem displaying ¿ symbol
« Reply #2 on: October 05, 2018, 12:21:46 am »
Ups...sorry... :D

FPC 3.0.4   Win 8 64   NotePad ++ text editor.

Ok, i'll check those links.

Thanks.


Thaddy

  • Hero Member
  • *****
  • Posts: 14377
  • Sensorship about opinions does not belong here.
Re: Problem displaying ¿ symbol
« Reply #3 on: October 05, 2018, 07:32:42 am »
In notepad++ type alt+191 (ANSI) or alt+0277 (Unicode)
« Last Edit: October 05, 2018, 07:34:28 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem displaying ¿ symbol
« Reply #4 on: October 05, 2018, 08:03:54 pm »
In notepad++ type alt+191 (ANSI) or alt+0277 (Unicode)

That's not the problem, Thaddy. Spanish keyboards have a key where both "¡" and "¿" can be typed directly and with Shift, respectively.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Problem displaying ¿ symbol
« Reply #5 on: October 05, 2018, 08:45:52 pm »
It may also arise from use of a font which does not support the ¿ character.
What console/terminal is used to display your WriteLn statements, and what is its default font?
Perhaps changing the console font to one that has a larger range of supported characters would solve the problem.

Ricardo T.

  • New Member
  • *
  • Posts: 13
Re: Problem displaying ¿ symbol
« Reply #6 on: October 06, 2018, 01:06:30 am »
Hello guys... :D

Thanks for  your interest in helping me, you rock  ;).

howardpc... I changed the font like you said and this time the '¿' symbol was displayed on the screen but,
an uppercase A is shown first next to it...

Terminal?  windows cmd.  on the cmd fonts choices i have 3, Consolas,Lucida Console and Raster fonts.

I'm using an American keyboard,and when i want to go Spanish mode i just press the Windows key + space bar to change modes.
I dunno if that matters...

like i said before, i'm a newbie in all of this about programming,so i apologize for posting such questions  :D

When writing code in text Editors the encoding should be on UTF-8? because that's what my notepad++
shows when i use it.

Again,Thanks to everyone  :D

You all have a nice day/night...

Ricardo.




Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Problem displaying ¿ symbol
« Reply #7 on: October 08, 2018, 07:58:27 pm »
howardpc... I changed the font like you said and this time the '¿' symbol was displayed on the screen but,
an uppercase A is shown first next to it...
This might be because the text codification.  I mean, UTF or ASCII or whatever. FPC uses UTF-8 by default while Windows uses ASCII/ISO.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018