# Problem with reading ping txt

**URL:** <https://scilab.discourse.group/t/problem-with-reading-ping-txt/988>\
**Category:** General usage\
**Created:** [June 27, 2025, 8:47am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988 "2025-06-27T08:47:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 8:47am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/1 "2025-06-27T08:47:06Z")

</div>

Hi scilab team, i faced a strange problem with this txt  
[Multiple\_Ping.txt](https://scilab.discourse.group/uploads/short-url/A2khgDtZDR8uW1bGU86e4rcQWXU.txt) (3.5 KB)

first i tried mgetl but i think it does not appreciate utf-8 or utf-16, secon i tried uiimport and it hangs and i dont think that csvRead is a good option.

when you have time it is not important to me, can you look closer?

M.f.G. Pascal

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 9:00am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/2 "2025-06-27T09:00:40Z")

</div>

csvTextscan gives Nan?

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [June 27, 2025, 11:27am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/3 "2025-06-27T11:27:36Z")

</div>

There is likely a problem in the encoding of your file. It is neither UTF-8 nor UTF-16 as the spurious character in

![Screenshot 2025-06-27 at 13.28.12](https://global.discourse-cdn.com/free1/uploads/utc/optimized/1X/c03265b184bb780e0c4a498750303ffcf2264096_2_690x35.png)

is U+0081 whereas is should be “ü”.

Please run the ping command in Powershell instead of DOS cmd to see if the encoding problem remains.

S.

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 11:43am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/4 "2025-06-27T11:43:33Z")

</div>

i did what you asked fore and did not touched the file, but still with mgetl not good

 ![2025-06-27 13_40_39-Ping-Test.sci (C__Users_buehlpas_Documents_Scilab_Ping-Test.sci) - SciNotes](https://global.discourse-cdn.com/free1/uploads/utc/original/1X/d745cb05d3476206338e943095d11fd1989894ba.png)  
[Multiple\_Ping.txt](https://scilab.discourse.group/uploads/short-url/zVj12gtMt8daj2M1svrKQ2HaGpU.txt) (5.9 KB)

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 11:55am UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/5 "2025-06-27T11:55:40Z")

</div>

[quote=“mottelet, post:3, topic:988”]  
U+0081 is Latin-1, its on windows 11, i tried to add -Encoding UTF8 but it gives me an error

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [June 27, 2025, 12:07pm UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/6 "2025-06-27T12:07:34Z")

</div>

My advice is to use Scilab’s internal output redirection of commands:

```auto
-> unix_g("ping www.google.com")

 ans = [12x1 string]

  ""                                                                             
  "Ping wird ausgeführt für www.google.com [142.250.179.100] mit 32 Bytes Daten:"
  "Antwort von 142.250.179.100: Bytes=32 Zeit=2ms TTL=117"                       
  "Antwort von 142.250.179.100: Bytes=32 Zeit=2ms TTL=117"                       
  "Antwort von 142.250.179.100: Bytes=32 Zeit=2ms TTL=117"                       
  "Antwort von 142.250.179.100: Bytes=32 Zeit=2ms TTL=117"                       
  ""                                                                             
  "Ping-Statistik für 142.250.179.100:"                                          
  " Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0"                        
  " (0% Verlust),"                                                            
  "Ca. Zeitangaben in Millisek.:"                                                
  " Minimum = 2ms, Maximum = 2ms, Mittelwert = 2ms"                 

```

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 12:27pm UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/7 "2025-06-27T12:27:45Z")

</div>

yes, this works, i have tested it, but what is wrong with the txt and mgetl?

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [June 27, 2025, 12:32pm UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/8 "2025-06-27T12:32:12Z")

</div>

> [@pascal](#):
>
> what is wrong with the txt

That’s just windows output redirection which does not correctly handle special characters. `mgetl` is supposed to be fed by authentical text and may be not robust when the string contains unassigned characters.

S.

---

<div class="post-metadata">

**Author:** ![pascal](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/pascal/32/40_2.png) [@pascal](https://scilab.discourse.group/u/pascal)\
**Post date:** [June 27, 2025, 12:35pm UTC](https://scilab.discourse.group/t/problem-with-reading-ping-txt/988/9 "2025-06-27T12:35:05Z")

</div>

ok, thanks, good to know.  
so i will use Scilab internal output.

m.f.g. Pascal
