# Readlines() output format

**URL:** https://discourse.julialang.org/t/readlines-output-format/59941
**Category:** General Usage
**Created:** [April 24, 2021, 5:48pm UTC](https://discourse.julialang.org/t/readlines-output-format/59941 "2021-04-24T17:48:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)
#### Post date: [April 24, 2021, 5:48pm UTC](https://discourse.julialang.org/t/readlines-output-format/59941/1 "2021-04-24T17:48:03Z")

</div>

I have tried to read lines from text file _filename.ixc_ using _readlines()_ function

```julia
readlines("filename.ixc")

```

and I have got strange output format.

In vscode I can see the file content as plaintext, a few lines follow

> [SETUP]  
> SPEED\_RES\_ASPECT\_PRIORITY\_MODE=PRIORITY\_RESOLUTION  
> CAMERA\_SPEED=SPEED\_16  
> FRAME\_SPEED=232142  
> RESOLUTION\_X=150  
> RESOLUTION\_Y=150  
> FRAME\_SIZE=22500  
> ASPECT\_RATIO\_MODE=ASPECT\_RATIO\_FULL  
> SHUTTER\_TIME=1000

In the output I got

> “\0[\0S\0E\0T\0U\0P\0]\0\r\0”  
> “\0S\0P\0E\0E\0D\0\_\0R\0E\0S\0\_\0A\0S\0P\0E\0C\0T\0\_\0P\0R\0I\0O\0R\0I\0T\0Y\0\_\0M\0O\0D\0E\0=\0P\0R\0I\0O\0R\0I\0T\0Y\0\_\0R\0E\0S\0O\0L\0U\0T\0I\0O\0N\0\r\0”  
> “\0C\0A\0M\0E\0R\0A\0\_\0S\0P\0E\0E\0D\0=\0S\0P\0E\0E\0D\0\_\x001\x006\0\r\0”  
> “\0F\0R\0A\0M\0E\0\_\0S\0P\0E\0E\0D\0=\x002\x003\x002\x001\x004\x002\0\r\0”  
> “\0R\0E\0S\0O\0L\0U\0T\0I\0O\0N\0\_\0X\0=\x001\x005\x000\0\r\0”  
> “\0R\0E\0S\0O\0L\0U\0T\0I\0O\0N\0\_\0Y\0=\x001\x005\x000\0\r\0”  
> “\0F\0R\0A\0M\0E\0\_\0S\0I\0Z\0E\0=\x002\x002\x005\x000\x000\0\r\0”  
> “\0A\0S\0P\0E\0C\0T\0\_\0R\0A\0T\0I\0O\0\_\0M\0O\0D\0E\0=\0A\0S\0P\0E\0C\0T\0\_\0R\0A\0T\0I\0O\0\_\0F\0U\0L\0L\0\r\0”  
> “\0S\0H\0U\0T\0T\0E\0R\0\_\0T\0I\0M\0E\0=\x001\x000\x000\x000\0\r\0”  
> “\0A\0C\0H\0I\0E\0V\0E\0D\0\_\0S\0H\0U\0T\0T\0E\0R\0\_\0T\0I\0M\0E\0=\x001\x000\x005\08\0\r\0”  
> “\0D\0I\0G\0I\0T\0A\0L\0\_\0G\0A\0I\0N\0\_\0M\0O\0D\0E\0=\0G\0A\0I\0N\0\_\0O\0F\0F\0\r\0”

Please do you have any idea how to read it properly?

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [April 24, 2021, 6:01pm UTC](https://discourse.julialang.org/t/readlines-output-format/59941/2 "2021-04-24T18:01:04Z")

</div>

It looks like the file is UTF-16 encoded. You can use [https://github.com/JuliaStrings/StringEncodings.jl](https://github.com/JuliaStrings/StringEncodings.jl) to read it.

---

<div class="post-metadata">

### Author: ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)
#### Post date: [April 24, 2021, 6:16pm UTC](https://discourse.julialang.org/t/readlines-output-format/59941/3 "2021-04-24T18:16:02Z")

</div>

Thank you very much. Solution was straightforward.

```julia
using StringEncodings

readlines("filename.ixc" , enc"UTF-16")

```
