Page 1 of 1
[Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 21:24
by zakhar
Hello, dear XYplorer Community!
XYplorer (v. 22.90 under Wondows 10) produces the following message if it reads a path
"C:\Folder\§123\123"
from an ini file key
Key="C:\Folder\§123\123"
- see picture:
reading-a-path-from-ini.jpg
A letter "B" which does not exist in this path appears before the "§" sign.
This prevents XYplorer from opening this path.
Is it a bug?
Do I something wrong?
How can I let XYplorer open this path by reading it from an ini file?
Re: Letter "B" in a path from an ini key
Posted: 03 Mar 2022 21:30
by highend
File encoding of that .ini file? and show the script part of it how it's read...
Re: Letter "B" in a path from an ini key
Posted: 03 Mar 2022 22:19
by zakhar
Thank you for your answer, highend!
I assumed from your answer that the "§" sign is allowed for paths read by XYplorer from an ini file key.
My further investigation showed, that the mentioned problem has nothing to do with XYplorer:
it receives the ready path from another not-XYplorer script...
I must dig by myself a bit deeper.
Re: Letter "B" in a path from an ini key
Posted: 03 Mar 2022 22:21
by highend
If you would only answer the questions...
Re: [Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 23:05
by zakhar
highend wrote: ↑03 Mar 2022 22:21
If you would only answer the questions...
Of course.
1. UTF-8.
2. AutoIt: Run($Program & " " & $Path)
This $Path contains already this "B" letter.
Re: [Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 23:08
by highend
What?
XYplorer (v. 22.90 under Wondows 10) produces the following message if it reads a path
"C:\Folder\§123\123"
from an ini file key
Key="C:\Folder\§123\123"
What does that have to do with AutoIt now? Show the XY script which reads that path from the .ini file...
Re: [Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 23:16
by zakhar
highend wrote: ↑03 Mar 2022 23:08
What does that have to do with AutoIt now? Show the XY script which reads that path from the .ini file...
I can't show something that does not exist.
I wrote: XYplorer
zakhar wrote: ↑03 Mar 2022 22:19
receives the ready path from another not-XYplorer script
AutoIt script itself creates the path and calls XYplorer to open that path.
Re: [Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 23:32
by highend
Make sure that the .ini file is saved as UTF-16 LE, with or without BOM doesn't matter. Problem solved
Re: [Solved] Letter "B" in a path from an ini key
Posted: 03 Mar 2022 23:49
by zakhar
highend wrote: ↑03 Mar 2022 23:32
Make sure that the .ini file is saved as UTF-16 LE, with or without BOM doesn't matter.
Perfect!
Thank you, highend!
I have followed your recommendation: I encoded the mentioned ini file to UTF-16 LE and voila! Autoit has returned the path without "B" !
