473,809 Members | 2,826 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

StrConv question... (continued from an old post)

MLH

Tom van Stiphout pointed out a syntaxn error that I
had made using StrConv on Mar 28. I was using
vbFromUnicode instead of vbUnicode. So, am OK
on that now.

Can someone help me understand what is being done
in the StrConv operation that turns this 19-character
string into a 38-char string:
?StrConv("My*** *@MyDomain.com" , vbUnicode)
M y A d d r @ M y D o m a i n . c o m

Here are the ASCII codes for each of the 38 characters:
77 0 121 0 65 0 100 0 100 0 114 0 64 0 77 0 121 0
68 0 111 0 109 0 97 0 105 0 110 0 46 0 99 0 111 0
109 0
What purpose is served by inserting a Chr$(0) after each character?
May 14 '07 #1
1 2156
MLH wrote:
>
Tom van Stiphout pointed out a syntaxn error that I
had made using StrConv on Mar 28. I was using
vbFromUnicode instead of vbUnicode. So, am OK
on that now.

Can someone help me understand what is being done
in the StrConv operation that turns this 19-character
string into a 38-char string:
?StrConv("My*** *@MyDomain.com" , vbUnicode)
M y A d d r @ M y D o m a i n . c o m

Here are the ASCII codes for each of the 38 characters:
77 0 121 0 65 0 100 0 100 0 114 0 64 0 77 0 121 0
68 0 111 0 109 0 97 0 105 0 110 0 46 0 99 0 111 0
109 0
What purpose is served by inserting a Chr$(0) after each character?
http://homepage.mac.com/thgewecke/unicode.html

From the article
"UTF-16 and 32 are not normally used to represent Unicode over the
internet. This is because various internet processes depend on the
recognition of 7-bit ASCII strings to function properly. When such ASCII
strings are encoded in the UTF -32 and 16 formats, they become
interspersed with bytes of the form 00, which represent the NULL control
character. This can make correct recognition difficult. Also there is
the general possiblity of UTF-16/32 bytes being interpreted as 7-bit
ASCII when this was not the intention, which could cause major problems.
In HTML documents, for example, almost all of the 33 control characters
present in 7-bit ASCII are not allowed."
May 14 '07 #2

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

Similar topics

15
2690
by: Good Man | last post by:
Hey there I have a dumb question.... Let's say i have a database full of 4000 people.... I select everything from the database by: $result = mysql_query("SELECT * FROM People");
2
11288
by: Leader | last post by:
HI, i got a problem while using StrConv function in sql server. My requirement is:- suppose in a name field i have "jhon smith" Now i want to run a sql which will give me the result like "Jhon Smith"--which means upper case first. Now i am running a query like below which is giving me "Jhon smith" but i want "Jhon Smith".
1
539
by: bigbinc | last post by:
What is wrong with this code, bStr() As Byte bStr = StrConv("yeas",vbUnicode) I can only assume I am missing a tools->reference, but for string conversion?
0
976
by: Elliot M. Rodriguez | last post by:
I have a web app that uses Crystal Reports 8.5 along with VB.Net. When attempting to access reports by a UNC file share path, I was getting access denied errors. I solved this problem eventually by running the aspnet process as a Domain Admin account (changed the processModel attribute in machine.config). I tried running the code block using impersonation as the same account, yet I continued to get Access Denied errors, even on...
1
23924
by: sbcglobal | last post by:
I am using VS .Net 2003 and trying to convert a unicode data (vb .net default string type?) to single byte using BData = StrConv(UData, vbFromUnicode) it is a method mentioned in http://support.microsoft.com/default.aspx?scid=kb;EN-US;174923 but the problem is vbFromUnicode is not supported in my version of vs .net, anyone knows what is the equivalent function in vs .net 2003?
0
1247
by: Norton | last post by:
I am using StrConv to convert simplified chinese encoding string to a traditional chinese coding string strResult = StrConv(strSimplifiedChinese, VbStrConv.TraditionalChinese) It works on one computer but it always return ??? in the other computer all windows have installed the chinese fonts Could anyone knows what's missing for the computer configuration?
10
1626
by: Michael McGarry | last post by:
Hi, I would like to form a regular expression to find a few different tokens (and, or, xor) followed by some variable number of whitespace (i.e., tabs and spaces) followed by a hash mark (i.e., #). What would be the regular expression for this? Thanks for any help, Michael
60
2384
by: Mark Healey | last post by:
I have a function that runs through a two dimensional array several times. 01 x=map->X; 02 do 02 { 04 y=map->Y; 05 do 05 { 06 stuff(); 07
3
3795
by: MLH | last post by:
?StrConv("SomeAddr@SomeDomain.net", vbFromUnicode) ??????????? When I use StrConv in the manner shown above, a bunch of question marks is all I ever see returned. Why might that be? Of what real use is StrConv? Can you give me a useful case example?
0
9721
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
10633
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...
1
10375
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
9198
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...
1
7651
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
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
5548
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...
2
3860
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.