|
Hello all,
I have a string of 4 Unicode chars in the format:
U+9ffU+5a01U+6c7dU+8eca.
U+ : represents the beggining of the char series.
I need to get the .Net string, in this case we want to get 4 Chinese letters:
駿威汽車
There is "the normal way" to use otomatic parsing of string:
string st = "\u99ff\u5a01\u6c7d\u8eca";
(and we get st = 駿威汽車)
but it is good just for copiler time and not for run time.
and the next code also don't work
string st = "U+99ffU+5a01U+6c7dU+8eca";
st = st.Replace("U+", @"\u");
string st1 = st;
Any Ideas'?
|
|
|
|
|
This might work for you, it deals with 6 chars at a time, ignoring 2 and
using the next 4, until nothing is left:
string result="";
while (st.Length!=0) {
int i=int.Parse(st.SubString(2,4), NumberStyles.AllowHexSpecifier);
result+=(char)i;
st=st.SubString(6);
}
provided you add some error handling.
|
|
|
|
|
You understood the question?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: You understood the question?
That's for the OP to decide.
But a few Chinese characters won't stop me...
|
|
|
|
|
LOL I reread the post several times now that I've had more coffee and
I (finally) realize I wasn't even close!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Forgive me if this is a silly or badly formulated question but I'm a newbie in .NET programming.
I need an easy way to exchange asynchronous messages between a Windows service (or client application) and a Web service.
Up till now I've considered (but still not implemented and tested) the following approaches:
- Using a TCP socket. Is there any standardized way in .NET to send/receive messages using this link? For example, using XML or SOAP as a standard encapsulation format for data.
- Using MSMQ. Is this a valid approach for this kind of applications? I could not find many information.
Do you have any suggestions and/or links to good reference material?
Regards,
Andrea
|
|
|
|
|
|
Hi,
I am developing a WPF application. I have a requirement where in user enters either partial name/ full name/account alias (e.g. Vipul OR Vipul Mehta OR vipul.mehta) in a WPF TextBox & clicks a customized WPF Resolve button. The resolve button should fetch data from GAL (Global Address List) & populate the text box. More specifically if the entered Name/account alias matches the exact name/account alias from the GAL the full name should then be displayed in the text box.
If more than 1 match is found, the system should open the Outlook address list box with all the matches similar to what is done is Outlook when composing an email.
Can any component of Outlook be utilised to achieve the above functionality?
Regards,
Vipul Mehta
Regards,
Vipul Mehta
modified on Friday, October 24, 2008 6:35 AM
|
|
|
|
|
Hi
Let's say there is a file C:\tempo (with no extension) and a folder C:\Tempo. How do I difference them using UNC?
|
|
|
|
|
pacoxl wrote: Let's say there is a file C:\tempo (with no extension) and a folder C:\Tempo
Let's say, how did you do that? I can't create both using Windows Explorer.
led mike
|
|
|
|
|
OK, my bad. Didn't try it. Thought it was possible
Sorry for wasting your time.
|
|
|
|
|
Hi Guys,
Is there a standard way for managing Guard Conditions for buttons / tool strip items / menu items that will automate turning on / off or show / hide?
I tend to end up writing a lot of guard logic on a case by case basis and it's horrible to maintain. Looking for an easier way.
Cheers
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Tristan Rhodes wrote: that will automate turning on / off or show / hide?
Turning on/off show/hide other UI components?
Tristan Rhodes wrote: I tend to end up writing a lot of guard logic on a case by case basis and it's horrible to maintain. Looking for an easier way.
You might like designing a solution, like using Design Patterns?
led mike
|
|
|
|
|
The basic idea was, i have an application with a large XML document that fills the role of the Model. I also have numerous buttons and drop down menu items that perform the same action when clicked, and their guard conditions are based on a number of elements in the model. I was looking for a mechanism to turn on / off all the controls registered to a particular command, particularly if it could handle dynamic menus and toolbars, and could be triggered from a single event such as when the Xml Document is changed.
I think i already have a solution, but it still needs refining, i was just wondering if there was an existing mechanism for supporting it.
Cheers.
T
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Thursday, October 23, 2008 12:17 PM
|
|
|
|
|
Something like this[^]? It was the first article I wrote for CP, so the style's a bit rough, but it should give you some ideas.
|
|
|
|
|
Something along those lines, but somewhat more advanced, I needed a mechanism for managing complicated guard conditions.
I have a solution and will put together an article on it when i've got time / finished playing all my outstanding 360 games.
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
As I said, it's basic, but the principal of using the ExtenderProvider should be sound.
|
|
|
|
|
Hi,
I have used a query in which it displays difference btw 2 columns,in few rows the data is missing or not present,but when i sub the values of the 2 columns i get few negative values.the sub values are displayed in a new column,when i drag this field on the crystal report the -ve values are not displayed.
So pls can any one help
Thanks
Annu
|
|
|
|
|
When you're running a component within ASP.NET, what account is it running under on Windows XP? Windows 2000? Windows 2003?
please help. its urgent
|
|
|
|
|
Since when are questions urgent on this website?
Your website runs using the IUSR_MACHINENAME user unless you changed this in the website configuration in IIS
|
|
|
|
|
You could also look at the ASPNET worker account.
|
|
|
|
|
joindotnet wrote: its urgent
No one cares.
Blog link to be reinstated at a later date.
|
|
|
|
|
You haven't mentioned the web server you are using. It could be either IUSR_MachineName or ASPNET. I guess for local dev server (Cassini), the user account is ASPNET.
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Can we pass viewstate data on another page.If yes,How?
|
|
|
|
|
Wrong forum - this should be in the ASP.NET forum, but seeing I'm in a relatively good mood, I'll answer this one. No you can't. Viewstate is used to recreate a page, and would be meaningless in the context of another page.
|
|
|
|