Load file name with special characters using libcurl

I tried to copy the HU98373 + TRRepr # o4_201702061135_34 file from the local system to the remote destination using curl FTP.

On the remote system, he created a file with HU98373 + TRRepr , but not HU98373 + TRRepr # o4_201702061135_34 . I do not know why he does not consider the symbol "#"

Please check the code below.

remoteFileUrl = ftp://IPADRESS/HOME/HU98373+TRRepr#o4_201702061135_34.tmp/C20170206.1135-20170206.1140

curl_easy_setopt(m_CurlSessionHandle, CURLOPT_URL, remoteFileUrl);
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_UPLOAD, ON);

                        // Set the input local file handle
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_READDATA, localFileHandle);

                        // Set on/off all wanted options
                        // Enable ftp data connection
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_NOBODY, OFF);

                        // Create missing directory into FTP path
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_FTP_CREATE_MISSING_DIRS , ON) ;

                        // Set the progress function, in oder to check the stop transfer request
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_NOPROGRESS, OFF);
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_PROGRESSFUNCTION, progressCb);
                        curl_easy_setopt(m_CurlSessionHandle, CURLOPT_PROGRESSDATA, this);

                        CURLcode curlOperationResult = curl_easy_perform(m_CurlSessionHandle);

Can anyone help me on this

+4
source share
1 answer

The URL consists of the following parts:

 scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]

# URL. URL- #, .

URL , .

, ++:

/ URL- ++

0

Source: https://habr.com/ru/post/1669153/


All Articles