Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
ASCII PROBLEMS WITH WINDOWS VERSIONS
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Offical launch of the 1 B...
by
Gustavo 'Gus' Carreno
[
Today
at 12:50:46 am]
what to do if my target M...
by
Laksen
[
Today
at 12:49:12 am]
For-in loop over constant...
by
ASerge
[
Today
at 12:36:09 am]
Converting a string/index...
by
TRon
[April 18, 2024, 11:56:37 pm]
exclude ALL packages from...
by
PascalDragon
[April 18, 2024, 11:33:29 pm]
Demoscene The Champs Crac...
by
KodeZwerg
[April 18, 2024, 11:29:50 pm]
Poll: Watches and Display...
by
440bx
[April 18, 2024, 10:55:14 pm]
Database standards OR Am ...
by
dseligo
[April 18, 2024, 10:50:26 pm]
BUG REPORT: Unable to gen...
by
PascalDragon
[April 18, 2024, 10:24:23 pm]
How to: create DLL file f...
by
paule32
[April 18, 2024, 10:23:59 pm]
Have anyone develop UEFI ...
by
PascalDragon
[April 18, 2024, 10:14:15 pm]
Lazarus for Windows on aa...
by
PascalDragon
[April 18, 2024, 10:09:10 pm]
The weird Rewrite bug
by
PascalDragon
[April 18, 2024, 09:58:53 pm]
Assign (textfile) not com...
by
PascalDragon
[April 18, 2024, 09:51:50 pm]
Question for people who h...
by
PascalDragon
[April 18, 2024, 09:44:32 pm]
Linux Workspaces -- StayO...
by
AmatCoder
[April 18, 2024, 08:34:20 pm]
I just released a commerc...
by
Seenkao
[April 18, 2024, 07:57:21 pm]
Access violation when re-...
by
TRon
[April 18, 2024, 07:37:31 pm]
[SOLVED] assembler name i...
by
TRon
[April 18, 2024, 07:26:33 pm]
A fairly simple sound sol...
by
KodeZwerg
[April 18, 2024, 07:01:52 pm]
Step-into the field sette...
by
Martin_fr
[April 18, 2024, 06:54:19 pm]
[Fun Fact] PNG and Micros...
by
Ten_Mile_Hike
[April 18, 2024, 06:24:19 pm]
HTTP/2+HTTP/1.1+WebSocket...
by
iLya2IK
[April 18, 2024, 06:14:30 pm]
Improvement of TFPTimerTh...
by
AlexTP
[April 18, 2024, 05:56:38 pm]
Arabic text, problem on L...
by
nouzi
[April 18, 2024, 05:21:27 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: ASCII PROBLEMS WITH WINDOWS VERSIONS (Read 4894 times)
Synaii
Newbie
Posts: 4
ASCII PROBLEMS WITH WINDOWS VERSIONS
«
on:
May 02, 2018, 06:34:28 am »
Hello guys, im programming a mini game using FPC in windows 7.. and my code cant run in windows 10, because ascii is bugged.. can you help me?
This characters are bugged in windows 10:
#177, #30, #31, #16, #17
Logged
tr_escape
Sr. Member
Posts: 432
sector name toys | respect to spectre
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #1 on:
May 02, 2018, 06:49:57 am »
Could you please send and example project for testing?
Is your project a console or a form project?
Logged
Handoko
Hero Member
Posts: 5153
My goal: build my own game engine using Lazarus
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #2 on:
May 02, 2018, 07:09:09 am »
@Synaii
Have you try SuperFastConsole? Someone had ASCII displaying problem but it's solved using SuperFastConsole unit:
http://forum.lazarus.freepascal.org/index.php/topic,29352.msg185276.html#msg185276
You can get the unit here:
http://forum.lazarus-ide.org/index.php/topic,29291.msg184756.html#msg184756
«
Last Edit: May 02, 2018, 08:06:24 am by Handoko
»
Logged
Thaddy
Hero Member
Posts: 14373
Sensorship about opinions does not belong here.
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #3 on:
May 02, 2018, 11:35:11 am »
Naaaaah, codepage problem.
Show us why it does not work wuth code and check which codepage YOUR windows is using.
Type just
chcp
in a console and report back.
Logged
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.
Synaii
Newbie
Posts: 4
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #4 on:
May 02, 2018, 07:13:07 pm »
I tried many things, a colleague told me that the problem was codepage, but I do not understand it, I tried to search to find out, but even then I did not understand it either.
Code: Pascal
[Select]
[+]
[-]
Const
Jogador_E
=
#17
;
Jogador_D
=
#16
;
Jogador_C
=
#30
;
Jogador_B
=
#31
;
Teleporte_De
=
#207
;
Parede_De
=
#177
;
BarraHP_De
=
#177
;
...
DesenhaXY
(
Jogador
.
Tipo
[
8
]
,
Jogador_E
,
Jogador
.
Tipo
[
5
]
,
Jogador
.
Tipo
[
6
]
)
;
DesenhaXY
(
Jogador
.
Tipo
[
8
]
,
Jogador_D
,
Jogador
.
Tipo
[
5
]
,
Jogador
.
Tipo
[
6
]
)
;
These characters will only be useful for the visual.
Prints of my project:
My screen (Windows 7):
https://imgur.com/a/nsuoPeX
My friend's screen (Windows 10):
https://imgur.com/a/mwHASUx
My codepage is 850.
@Att: Im using the unit Super..
Is correct?
https://imgur.com/a/BKIzQkb
.. the executable of my game, and the unit super.o and .ppu in same past
download:
http://www.mediafire.com/file/faiz2s85il0hilq/GadesWay.rar
Thank you guys for help me!
«
Last Edit: May 02, 2018, 07:53:57 pm by Synaii
»
Logged
ASerge
Hero Member
Posts: 2242
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #5 on:
May 03, 2018, 05:20:25 pm »
Try this simple program on Win7 and Win 10 and see the result.
Code: Pascal
[Select]
[+]
[-]
{$MODE OBJFPC}
{$APPTYPE CONSOLE}
program
Project1
;
const
C
=
#17
#16
#30
#31
#207
#177
;
procedure
Print
;
var
ShortS
:
ShortString
=
C
;
AnsiS
:
AnsiString
=
C
;
begin
Writeln
;
Writeln
(
'ShortString = '
,
ShortS
)
;
Writeln
(
'AnsiString = '
,
AnsiS
)
;
end
;
begin
Writeln
(
'DefaultSystemCodePage = '
,
DefaultSystemCodePage
)
;
Writeln
(
'ConsoleCodePage = '
,
TextRec
(
Output
)
.
CodePage
)
;
Print
;
SetMultiByteConversionCodePage
(
TextRec
(
Output
)
.
CodePage
)
;
Writeln
;
Writeln
(
'DefaultSystemCodePage = '
,
DefaultSystemCodePage
)
;
Print
;
Readln
;
end
.
Logged
Remy Lebeau
Hero Member
Posts: 1314
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #6 on:
May 04, 2018, 03:17:08 am »
Quote from: Synaii on May 02, 2018, 06:34:28 am
This characters are bugged in windows 10:
#177, #30, #31, #16, #17
#177 is
not
an ASCII character. ASCII only goes up to #127. Anything between #128-#255 is codepage-dependent.
#16, #17, #30, and #31 are all
non-visual
control characters, you shoun't be trying to print them out visually.
Logged
Remy Lebeau
Lebeau Software
- Owner, Developer
Internet Direct (Indy)
- Admin, Developer (
Support forum
)
Handoko
Hero Member
Posts: 5153
My goal: build my own game engine using Lazarus
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #7 on:
May 04, 2018, 12:01:14 pm »
@Synaii
Your GadesWay looks good, unfortunately I don't understand the language. Maybe you can consider to use English.
Below are the screenshots of your game running on my Linux - Wine:
Logged
Synaii
Newbie
Posts: 4
Re: ASCII PROBLEMS WITH WINDOWS VERSIONS
«
Reply #8 on:
May 04, 2018, 11:37:15 pm »
Hello everyone, thank you for helping me .. I updated the game to English, and I did the tests they asked for, but honestly, I do not understand much of what they are asking me to do .. hahah, I'm sorry. I replaced the characters that were in trouble.
Link updated:
http://www.mediafire.com/file/v2ajwmaagucgox3/GateWays.rar
The source code is in .rar
«
Last Edit: May 05, 2018, 07:12:24 pm by Synaii
»
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
Beginners
(Moderators:
FPK
,
Tomas Hajny
) »
ASCII PROBLEMS WITH WINDOWS VERSIONS
TinyPortal
© 2005-2018