# When running Slicer with Chinese parameters in CMD, how can I correctly pass and retrieve the Chinese parameters?

**URL:** <https://discourse.slicer.org/t/when-running-slicer-with-chinese-parameters-in-cmd-how-can-i-correctly-pass-and-retrieve-the-chinese-parameters/32920>\
**Category:** Support\
**Created:** [November 21, 2023, 6:37am UTC](https://discourse.slicer.org/t/when-running-slicer-with-chinese-parameters-in-cmd-how-can-i-correctly-pass-and-retrieve-the-chinese-parameters/32920 "2023-11-21T06:37:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yulaomao](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yulaomao/32/78556_2.png) [@yulaomao](https://discourse.slicer.org/u/yulaomao)\
**Post date:** [November 21, 2023, 6:37am UTC](https://discourse.slicer.org/t/when-running-slicer-with-chinese-parameters-in-cmd-how-can-i-correctly-pass-and-retrieve-the-chinese-parameters/32920/1 "2023-11-21T06:37:32Z")

</div>

Hi, everyone. I would like to pass some Chinese parameters when launching Slicer, such as ‘Slicer.exe -f “你好！”’ so that I can read these parameters within Slicer. Currently, I have managed to read the parameters using `app.argument` , but Chinese characters are displayed as garbled text. Can anyone provide some suggestions? Thank you very much!

---

<div class="post-metadata">

**Author:** ![yulaomao](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yulaomao/32/78556_2.png) [@yulaomao](https://discourse.slicer.org/u/yulaomao)\
**Post date:** [November 21, 2023, 6:46am UTC](https://discourse.slicer.org/t/when-running-slicer-with-chinese-parameters-in-cmd-how-can-i-correctly-pass-and-retrieve-the-chinese-parameters/32920/2 "2023-11-21T06:46:12Z")

</div>

I saw on a forum that it is possible to modify the CTK code to achieve this, as mentioned in this link: [Fix passing of non-ASCII characters as command-line arguments by lassoan · Pull Request #127 · commontk/AppLauncher · GitHub](https://github.com/commontk/AppLauncher/pull/127/commits/872e8df61f9bd69958a772c1da92fc191f755e85). I followed the instructions in that link to modify the relevant code and compiled it, but it didn’t work. The Chinese parameters still appear as garbled text. I also added some code inside the relevant function in ctkAppArguments.cpp to save the parameters to a local text file, but that code didn’t execute either, and no data was written to the text file. Am I using the correct method to compile CTKAppLauncher?

---

<div class="post-metadata">

**Author:** ![yulaomao](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yulaomao/32/78556_2.png) [@yulaomao](https://discourse.slicer.org/u/yulaomao)\
**Post date:** [November 21, 2023, 6:49am UTC](https://discourse.slicer.org/t/when-running-slicer-with-chinese-parameters-in-cmd-how-can-i-correctly-pass-and-retrieve-the-chinese-parameters/32920/3 "2023-11-21T06:49:36Z")

</div>

![f101ddd77b3e7932c6cd9da73a2ca573](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/4/045b9c974d51691fa111b4623cff2e68aebbee7b.jpeg)
