|
Hi,
I want to convert different character encodings like koi8-r to ASCII.
Where can I find information about them?
I can see there are many charsets - utf-8, windows-1251 etc.
|
|
|
|
|
Daniel Kanev wrote: I want to convert different character encodings like koi8-r to ASCII.
You can't convert kio8-r to ASCII. The former covers Cyrillic alphabet, and the later Latin (the English subset of Latin, really). What exactly do you want to do?
|
|
|
|
|
Message Closed
modified 8-Mar-17 3:44am.
|
|
|
|
|
|
Hello every one,
I'm trying to generate log files in XML using MSXML4. Right now I'm trying to get it working correctly in a test application, so that when I get it right I could just implement the same thing in the actual project i need to work on.
This operation is intended to log the calling of functions in the application and the XML it needs to generate should be something like this
<pre>
<CallSequence>
<Call>
<ObjectType>Unit</ObjectType>
<ObjectName>ChemSepUO_382</ObjectName>
<Interface>ICapeUnit</Interface>
<Method>Calculate</Method>
<CallSequence>
<Call>
<ObjectType>Material Object</ObjectType>
<ObjectName>Mix out</ObjectName>
<Interface>ICapeThermoMaterialObject</Interface>
<Method>SetProp</Method>
<Arguments>
<Inputs>
<Row>
<Property>Volume</Property>
<Phase>Overall</Phase>
<Basis>Mole</Basis>
<Calc>Mixture</Calc>
</Row>
<Row>
<Property>My Property</Property>
<Phase>phaseValue</Phase>
<Basis>Molecule</Basis>
<Calc>Mkkkl</Calc>
</Row>
</Inputs>
<Outputs>
<Row>
<Value>0.000018075</Value>
</Row>
</Outputs>
</Arguments>
<ReturnCode>No Error</ReturnCode>
<CallSequence>
<Call>
<ObjectType>Unit</ObjectType>
<ObjectName>ChemSepUO_382</ObjectName>
<Interface>ICapeUnit</Interface>
<Method>Third Level of Recursion</Method>
<ReturnCode>No Error</ReturnCode>
</Call>
</CallSequence>
</Call> ...</pre>
Its the nesting of function calls (callsequence nodes in this case) which is causing the problem. The problem is that in the actual application I dont have access to the code that is calling those functions I need to log. So this nesting looks almost impossible for now.
The XML that is generated right now looks like this where function4 is actually called from Function1 but its not getting nested inside.
<pre><LOG>
<CallSequence>
<Call><MethodName>Function1</MethodName>
<Interface>ICapeThermo</Interface>
</Call>
<Call><MethodName>Function4</MethodName>
<Interface>ICapeThermo</Interface>
</Call>
</CallSequence></LOG></pre>
I'm in real hot water now... looks like I'm completely out of ideas...
Can u give me any idea or help in anyway?
Thanks for your time
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
As an aside, who came up with the requirement for using XML for logging? Based on the XML shown above, you have much more XML markup than content. Logging something like a crash/dump is one thing, but this looks like runtime-logging...
Logging should not be a drain on performance. But XML, and XML combined with MSXML does not exactly scream high-performance...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
well first of all, thank you so much for answering!
This idea was given by my boss and other seniors and well I think you're right but this task has been given to me n now I gotta do something abt it right?
At the moment this whole call Tree scenario looks pretty vague if u ask me!
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
James R. Twine wrote: But XML, and XML combined with MSXML does not exactly scream high-performance...
There are all kinds of production loggers that use XML. Performance is not a problem. "Logging" is not actually specific enough to determine what logging mechanism is appropriate.
|
|
|
|
|
A good and valid point.
I was merely going on my experience with things that I have and do with on/with. And with these systems, performance does matter and can be a problem, so I cannot take for granted things that other developers get away with.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I am not aware of any logging scheme that produces a call tree. It might not even make sense logically. With normal logging if you log every method entry there will be a natural sequence that is only upset in multi-threaded environments. In that case you can include the ThreadID in the log so they can be queried by thread to produce each threads actual sequence.
|
|
|
|
|
well actually I dont think there's any multithreading involved here. but still the problem is that I have the functions which are called but I dont have the code that actually calls those functions. and I think to get the call tree right I need that part as well bcz you can't possibly judge inside a called function that at what level in the calling heirarchy it was called (I hope u get my point bcz it was a really hard one to explain )
anyway thanks for ur time I appreciate this!
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: but still the problem is that I have the functions which are called but I dont have the code that actually calls those functions.
I have no idea what that means.
|
|
|
|
|
OK let's just forget it for the time being, I've told them I can't make up a Call Tree this whole idea is a mess.
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hello everyone,
What is the purpose of virtual destructor? If currently, no derived class?
thanks in advance,
George
|
|
|
|
|
Planning for the future.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
James R. Twine wrote: Planning for the future.
\o/
|
|
|
|
|
Thanks toxcct,
Could you describe in more details please what advantages we could get if we have a derived class please? Compared with non-virtual destructor?
regards,
George
|
|
|
|
|
WTF is the problem with you ?
i'm starting to be tired of you and your F*CKING voting mania.
i was not answering anything related to your question, i was just joking with James, so
1) why on hell do you vote me 2 ?
2) why did you down voted his post ?
3) why do you ask me about virtual desctructors if i don't talk to you ?
4) WTF ?!
|
|
|
|
|
Chill out! It's a public forum.
Steve
|
|
|
|
|
Thanks James,
Could you describe in more details please what benefits we could get if we have a derived class please? Compared with non-virtual destructor?
regards,
George
|
|
|
|
|
George_George wrote: What is the purpose of virtual destructor?
To ensure that the proper derived class destructor is called if an object of a derived class is deleted through a pointer to a base class. If a class has any virtual functions, it should have a virtual destructor.
George_George wrote: If currently, no derived class?
Can you guarantee that your class will never be derived from? If so, then a virtual destructor is not necessary.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks DavidCrow,
DavidCrow wrote: Can you guarantee that your class will never be derived from? If so, then a virtual destructor is not necessary.
Your reply makes senses.
DavidCrow wrote: To ensure that the proper derived class destructor is called if an object of a derived class is deleted through a pointer to a base class. If a class has any virtual functions, it should have a virtual destructor.
Could you show a simple sample (or some pseudo code) why *ensure that the proper derived class destructor is called* please? Compared with non-virtual destructor?
regards,
George
|
|
|
|
|
George_George wrote: Your reply makes senses
that's why you gave him '3' ?
|
|
|
|
|
George_George wrote: What is the purpose of virtual destructor? If currently, no derived class?
If your class is meant to be derived from and used in a polimorphic manner (a base pointer to a derived class' object), virtual destructor is a must.
On the other hand, if the class is a "concrete type" that is never meant to be derived from, virtual destructor is not required.
|
|
|
|
|
Thanks Nemanja,
I think you mean if the destructor is virtual, then if we delete an object of derived class through based class pointer, then the derived class destructor is invoked? Right?
If the destructor is non-virtual, then if we delete an object of derived class through based class pointer, then the base class destructor is invoked? Right?
regards,
George
|
|
|
|