Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED]"Reading large output" and fileneme with special chars
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
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
FPC 3.2.2 + Lazarus 3.4 C...
by
paule32
[
Today
at 11:18:59 pm]
FPC 3.2.2 using Result wi...
by
paule32
[
Today
at 11:16:52 pm]
FPC 3.2.2 - maximum Lengt...
by
paule32
[
Today
at 11:09:57 pm]
debugger not showing vari...
by
rohran
[
Today
at 11:05:01 pm]
[solved] macro for code ?
by
Zoran
[
Today
at 11:04:56 pm]
Knob Finger Spinner Graph...
by
circular
[
Today
at 10:15:44 pm]
Snaking ZigZag Curve: PRO...
by
Handoko
[
Today
at 10:12:04 pm]
Library: Embed DLL in EXE
by
Tomxe
[
Today
at 09:57:37 pm]
MVP made easier.
by
Hansvb
[
Today
at 09:45:27 pm]
Writing a TMemo widget fr...
by
paule32
[
Today
at 08:38:32 pm]
ChatGPT and algorithms
by
TBMan
[
Today
at 06:18:46 pm]
Deleting exe-file not wor...
by
d2010
[
Today
at 06:14:27 pm]
Named range
by
Thaddy
[
Today
at 05:22:17 pm]
Math.RoundTo incorrect so...
by
BeniBela
[
Today
at 04:07:40 pm]
2d "platform" game sugges...
by
TBMan
[
Today
at 03:47:29 pm]
Rain Simulator
by
Boleeman
[
Today
at 02:57:30 pm]
Turbo Pascal's default fo...
by
Thaddy
[
Today
at 02:34:28 pm]
Amigo programming languag...
by
paxscript
[
Today
at 02:07:13 pm]
More AI hype?
by
Joanna from IRC
[
Today
at 02:01:16 pm]
I didn't expect this
by
simone
[
Today
at 01:40:01 pm]
Reading axis range after ...
by
wp
[
Today
at 11:41:42 am]
Testing with SQLite3DataS...
by
CharlyTango
[
Today
at 10:55:38 am]
Detecting symbol correspo...
by
Tommi
[
Today
at 10:13:27 am]
[SOLVED] WebP images and ...
by
circular
[
Today
at 09:29:34 am]
[SOLVED] How to "Jump To"...
by
Markus
[
Today
at 09:24:57 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED]"Reading large output" and fileneme with special chars (Read 1903 times)
bonmario
Sr. Member
Posts: 346
[SOLVED]"Reading large output" and fileneme with special chars
«
on:
February 28, 2018, 12:12:23 pm »
Hi,
i'm using this example:
http://wiki.freepascal.org/Executing_External_Programs#Reading_large_output
In my directory, i have a file with name "Già inviati per email".
Running the example, that file name becames "Gi? inviati per email".
It's a bug?
I've attached the project
Thanks in advance, Mario
«
Last Edit: March 02, 2018, 07:53:32 am by bonmario
»
Logged
bigeno
Sr. Member
Posts: 266
Re: "Reading large output" and fileneme with special chars
«
Reply #1 on:
February 28, 2018, 12:49:19 pm »
windows console have other encoding then GUI
Logged
bonmario
Sr. Member
Posts: 346
Re: "Reading large output" and fileneme with special chars
«
Reply #2 on:
March 01, 2018, 08:17:32 am »
I also tried to convert it with "WinCPToUTF8", but the result is still wrong.
I had forgotten to write this information:
Lazarus 1.9.0 r57219 FPC 3.0.2 i386-win32-win32/win64
Hi, Mario
Logged
marcov
Administrator
Hero Member
Posts: 12152
FPC developer.
Re: "Reading large output" and fileneme with special chars
«
Reply #3 on:
March 01, 2018, 08:47:25 am »
Console can also be in OEM encoding. But the in time TProcess must be redone using -W functions.
Logged
balazsszekely
Guest
Re: "Reading large output" and fileneme with special chars
«
Reply #4 on:
March 01, 2018, 09:22:09 am »
For Italian filenames this should do the trick:
Code: Pascal
[Select]
[+]
[-]
Memo1
.
Lines
.
LoadFromStream
(
OutputStream
)
;
Memo1
.
Lines
.
Text
:
=
ConvertEncoding
(
Memo1
.
Lines
.
Text
,
GetConsoleTextEncoding
,
EncodingUTF8
)
;
//add this line
OutputStream
.
Free
;
Logged
bonmario
Sr. Member
Posts: 346
Re: "Reading large output" and fileneme with special chars
«
Reply #5 on:
March 01, 2018, 10:21:20 am »
It work fine !!!
Thanks, Mario
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED]"Reading large output" and fileneme with special chars
TinyPortal
© 2005-2018