473,834 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

String parameter dll function

Wyz
Hello.
I have troubles giving me a big headache, I hope somebody may help me.
I'm using Indy.Sockets to have FTP support for my VB.NET application (I also
tried with another dll made in C# but the trouble is the same).
The idea is that I added a dll as a reference to my project. There is a FTP
object which have the method put (path as string, name as string, append as
boolean).
Here is the trouble now and I saw a lot of articles on it but it didn't make
it clearer. When giving strings containing accentuated characters (eg. 'é')
to the string arguments, the accentuated characters are replaced by a '?'
causing the ftp upload to file (for example calling "ftp.put
("éééé","é ",false) throws the ftp command "STOR ?".
What's the matter and how to solve it ? (maybe I have to convert my string
in an other type of sting but I can't figure out).
Best regards.

Jun 21 '06 #1
3 1276
Hello Wyz,

é is a unicode character. Both the FTP library and the FTP server/OS must
understand unicode.
Unicode is a 2-byte character set.. so if either the Library and/or the server
only understand 1-byte character sets it'll interpret each byte of the 2-byte
character set as an individual character.. thus your problem.

Enjoy,
-Boo
Hello.
I have troubles giving me a big headache, I hope somebody may help me.
I'm using Indy.Sockets to have FTP support for my VB.NET application
(I also
tried with another dll made in C# but the trouble is the same).
The idea is that I added a dll as a reference to my project. There is
a FTP
object which have the method put (path as string, name as string,
append as
boolean).
Here is the trouble now and I saw a lot of articles on it but it
didn't make
it clearer. When giving strings containing accentuated characters (eg.
'é')
to the string arguments, the accentuated characters are replaced by a
'?'
causing the ftp upload to file (for example calling "ftp.put
("éééé","é",fal se) throws the ftp command "STOR ?".
What's the matter and how to solve it ? (maybe I have to convert my
string
in an other type of sting but I can't figure out).
Best regards.

Jun 21 '06 #2
Wyz
Hello.
The FTP Server accepts them, I tested it.
What I don't understand is that how it can be loose from my vb to the dll
method and how to solve it...
Sincerly.

"GhostInAK" wrote:
Hello Wyz,

é is a unicode character. Both the FTP library and the FTP server/OS must
understand unicode.
Unicode is a 2-byte character set.. so if either the Library and/or the server
only understand 1-byte character sets it'll interpret each byte of the 2-byte
character set as an individual character.. thus your problem.

Enjoy,
-Boo
Hello.
I have troubles giving me a big headache, I hope somebody may help me.
I'm using Indy.Sockets to have FTP support for my VB.NET application
(I also
tried with another dll made in C# but the trouble is the same).
The idea is that I added a dll as a reference to my project. There is
a FTP
object which have the method put (path as string, name as string,
append as
boolean).
Here is the trouble now and I saw a lot of articles on it but it
didn't make
it clearer. When giving strings containing accentuated characters (eg.
'é')
to the string arguments, the accentuated characters are replaced by a
'?'
causing the ftp upload to file (for example calling "ftp.put
("éééé","é ",false) throws the ftp command "STOR ?".
What's the matter and how to solve it ? (maybe I have to convert my
string
in an other type of sting but I can't figure out).
Best regards.


Jun 22 '06 #3
Wyz
Ok.
We found it. The lot of FTP clients are getting a char buffer from which
they get the ascii chars.
My troubles are coming from here as "é" is not in ASCII encoding.
I finally found a C# DLL on which I can update the source code and I
replaced ASCII by the default encoding of the system.
Best regards.
Jun 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
1635
by: Eli Daniel | last post by:
Hi, I'm new to Python. Can you please tell me if the following is possible. My users are using other scripting launguage to write scripts. They are used to write somthing like (keeping it simple) T = 100 do_action ('It cost $T dollars')
9
3701
by: Derek Hart | last post by:
I wish to execute code from a string. The string will have a function name, which will return a string: Dim a as string a = "MyFunctionName(param1, param2)" I have seen a ton of people discuss how reflection does this, but I cannot find the syntax to do this. I have tried several code example off of gotdotnet and other articles. Can somebody please show me the code to do this?
28
8092
by: David Rubin | last post by:
I looked on google for an answer, but I didn't find anything short of using boost which sufficiently answers my question: what is a good way of doing string tokenization (note: I cannot use boost). For example, I have tried this: #include <algorithm> #include <cctype> #include <climits> #include <deque> #include <iostream>
18
2436
by: JKop | last post by:
Can some-one please point me to a nice site that gives an exhaustive list of all the memberfunctions, membervariables, operators, etc. of the std::string class, along with an informative description of how each works. I've been trying Google for the last 20 minutes but can't get anything decent. Thanks.
4
2674
by: MLH | last post by:
The following function declaration confuses me... Public Function IsEMailAddress(ByVal sEmail As String, Optional ByRef sReason As String) As Boolean I tried pasting it and its code into an Access 2.0 module. I was unsuccessful. I had to remove the following... "Public" "Optional ByRef" "As Boolean"
2
7489
by: caviar | last post by:
I'm trying to read in a ref parameter from a native dll, its working in vb if i use the kernel32 functions below transforming the ref param to a vb string: Now, i want to skip this vb dll and use the native dll directly from c# // CharSet = CharSet.Auto, CallingConvention =CallingConvention.StdCall )] public static extern short PAF_GetRecord(short listndx, short recno, ref string pafrec, ref short pafreclen );
14
15055
by: Bob | last post by:
I have a function that takes in a list of IDs (hundreds) as input parameter and needs to pass the data to another step as a comma delimited string. The source can easily create this list of IDs in a comma-delimited string or string array. I don't want it to be a string because I want to overload this function, and it's sister already uses a string input parameter. Now if I define the function to take in a string array, it solves my...
10
16434
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not recognized as a valid Boolean. Public Sub UpdateCustomer_DashboardGraphs(ByVal sender As Object, ByVal e As System.EventArgs)
4
2387
by: simon | last post by:
hi, I would like to separate my javascript completely from my xhtml. in the end there should be only <script type="text/javascript" src="javalib.js"></script> in the head-tag to my javascript. Because I want to use some ajax-requests and other javascript-functions on my xhtml, I need to dynamically add event handlers to any possible dom-elements. All solutions I found so fare are for specific, pre-known
6
14808
by: Andrea | last post by:
Hi, suppose that I have a string that is an hexadecimal number, in order to print this string I have to do: void print_hex(unsigned char *bs, unsigned int n){ int i; for (i=0;i<n;i++){ printf("%02x",bs); } }
0
9796
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10790
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10505
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9329
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6952
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.