Forum > Beginners

Displaying Arabic on Console

(1/8) > >>

pascal111:
حاولتُ طباعة عدة عبارات عن طريق writeln على الـ console ولكن لم تظهر إلا علامات إستفهام مكان النّص حيث كانت العبارات المطلوب طباعتها عربيّة فهل الـ console لا يعرض إلى الـ Ascii code فقط؟

google translate:

"I tried to print several expressions using writeln on the console, but only question marks appeared in the place of the text, as the expressions to be typed were in Arabic, so is the console not only displayed in "except" the Ascii code?"


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1; {$mode objfpc}{$H+} uses  {$IFDEF UNIX}{$IFDEF UseCThreads}  cthreads,  {$ENDIF}{$ENDIF}  Classes  { you can add units after this }; begin   writeln('هل تقرأ السطر الحالي؟');  writeln('ماذا تجد؟ كلمات ،وهل تراها جيّداً؟');  writeln('ماذا تقولُ هذه الكلمات؟ ليس أكثر من الإستفسار عن إذا كنت تقرؤها أم لا ،إنّها الشيء من اللاشيء!');   writeln;   writeln('Do you read the current line?');  writeln('What do you find? Words, and do you see them well?');  writeln('What do these words say? It is nothing more than asking if you are reading it or not, it is something out of nothing!');end.  

(https://i.postimg.cc/N2jwYccg/Screenshot-at-2021-05-11-18-05-50.png)

marcov:
Try putting {$codepage utf8} after the {$mode line.

pascal111:

--- Quote from: marcov on May 11, 2021, 06:23:17 pm ---Try putting {$codepage utf8} after the {$mode line.

--- End quote ---

للأسف لم يعمل هذا الموجّه ،نتيجة التنفيذ كما هي.

google translate:

"Unfortunately this router "directive" did not work, as a result of implementation "running" as is."

Martin_fr:
(if you are (still) on Linux, then) Try it from a terminal outside the IDE.

Just in case the build in IDE console window has a problem.

pascal111:

--- Quote from: Martin_fr on May 11, 2021, 06:45:15 pm ---(if you are (still) on Linux, then) Try it from a terminal outside the IDE.

Just in case the build in IDE console window has a problem.

--- End quote ---

مازلتُ على الـ Linux فليس لديّ نسخة Windows مُرخّصة للإستخدام الشخصي.

قُمتُ بعمل compile للبرنامج فحاولتُ تشغيل ملفه التنفيذي مُتوقّعاً أن يعمل على الـ Terminal ولكنّني لم أرى أيّ أثرٍ ﻷيّ تنفيذ ولم تُفتح نافذة الـ Terminal أصلاً ،ثمّ ظننتُ أنّكـ تقصد مُحاولة تنفيذ ذلكـ عن طريق مُترجم fpc على الـ Terminal فنفّذت الأوامر التالية ولكن النتيجة كما هو موضّح أدناه:

google translate:

"I'm still on Linux as I do not have a licensed copy of Windows for personal use.

I "made a" compile the program and tried to run its executable file expecting it to work on the terminal, but I did not see any trace "effect" of any execution and the terminal window did not open at all, then I thought that you intended to try to implement run it via the fpc compiler on the terminal, so I executed the following commands, but the result is as shown Below:"


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---pascal@pascal-Lenovo-ideapad-330-15AST:~/Computer/Lazarus/Lazarus Projects/Studying Projects/Common$ fpc ./project1.lprFree Pascal Compiler version 3.2.0 [2020/07/07] for x86_64Copyright (c) 1993-2020 by Florian Klaempfl and othersTarget OS: Linux for x86-64Compiling ./project1.lprFatal: Cannot open file "project1.lpr"Fatal: Compilation abortedError: /usr/bin/ppcx64 returned an error exitcodepascal@pascal-Lenovo-ideapad-330-15AST:~/Computer/Lazarus/Lazarus Projects/Studying Projects/Common$   

Navigation

[0] Message Index

[#] Next page

Go to full version