473,396 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1263
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 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
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...
9
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...
28
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)....
18
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...
4
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...
2
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...
14
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...
10
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...
4
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....
6
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++){...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.