Modify

Opened 7 years ago

Closed 7 years ago

#3569 closed Bug (No Bug)

CmdLine parameter charset

Reported by: truefriend.cz@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

I have script for get parameter as text with special charsets but i do not show as original line. How i can show as original? On this forum i find only How file open as UTF-8, etc. But this problem no.
cmd script:

@echo off
Test.exe "D:\Folder1\Folder2\ěščřžýáíéúů\Folder3" "green.txt"
exit

Test.au3 script:

#include <MsgBoxConstants.au3>
#include <file.au3>
#include <Array.au3>

Global $parameter
If Not $CmdLine[0] Then
    MsgBox(0, 'Info', 'Sorry but you not defined param for running.' & @CRLF & @CRLF & @CRLF & 'Examples:' & @CRLF & @CRLF & @ScriptName & ' "C:\Path\PathNext" "filename.ext"')
    Exit
EndIf

Global Enum $giParam_1,$giParam_2,$giParam_UBound
Global $aParams[$giParam_UBound]
For $i = 1 to UBound($CmdLine)-1
    If $i > $giParam_UBound Then
        MsgBox(0, 'Info', "More Params included than expected!" & @CRLF & @CRLF & " Accept Params is: " & $giParam_UBound)
        ;ExitLoop
        Exit
    EndIf
    $aParams[$i-1]=$CmdLine[$i]
Next

MsgBox(1, "Split", $aParams[$giParam_1] & "\" & $aParams[$giParam_2])
;MsgBox(1, "Split 2", $CmdLineRaw) ;;; have bug too

Exit

Bad output:
https://www.autoitscript.com/forum/uploads/monthly_2017_10/Image.png.f4ee85ada8004dba6b548ff381376e59.png

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by Jos

Can't replicate it and is working fine for me:

  • put your code in a test.au3 file encoded as UTF8 without bom
  • Compiled it
  • Started CMD prompt and did command: Test.exe "D:\Folder1\Folder2\ěščřžýáíéúů\Folder3" "green.txt"

The MSGBOX shows:


Split


D:\Folder1\Folder2\ěščřžýáíéúů\Folder3\green.txt


OK Annuleren


Version 0, edited 7 years ago by Jos (next)

comment:2 Changed 7 years ago by Jos

I am closing this as Nobug and let's continue the discussion in the forum:
https://www.autoitscript.com/forum/topic/190592-cmdline-parameter-charset/?do=findComment&comment=1368073

comment:3 Changed 7 years ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.