S
schaf
Hi NG!
I have a .NET project which uses a sublibrary written in C++.
On the .NET side I use the XMLSerializer to serialize an object (into
an MemoryStream). This stream would be casted into a byte-array and
then passed to the C++ sublibrary.
The sublibrary ha sthe intention to convert the XML into and other XML
based format.
Unfortunately the values in the final file are wrong in the following
case.
If the workstation is running with loc-setting en-US (numberFormat)
everything works without problem, but if I change the NumberFormat to
fr-FR the results are wrong.
I compared the XML before passing it to the C++ library. There is no
difference between the two files (fr or us). All double values were
written with a point (no comma in french is used). Therefore I guess
the XMLSerializer writes the file independent of the LOC settings ?!
I tried to start a separate thread for calling the C++ function. I
changed the ThreadCulture, but nothing changed.
I can't change the CultureInfo of the StreamWriter (it's a getter
property)! how can I solve my problem ?
I have a .NET project which uses a sublibrary written in C++.
On the .NET side I use the XMLSerializer to serialize an object (into
an MemoryStream). This stream would be casted into a byte-array and
then passed to the C++ sublibrary.
The sublibrary ha sthe intention to convert the XML into and other XML
based format.
Unfortunately the values in the final file are wrong in the following
case.
If the workstation is running with loc-setting en-US (numberFormat)
everything works without problem, but if I change the NumberFormat to
fr-FR the results are wrong.
I compared the XML before passing it to the C++ library. There is no
difference between the two files (fr or us). All double values were
written with a point (no comma in french is used). Therefore I guess
the XMLSerializer writes the file independent of the LOC settings ?!
I tried to start a separate thread for calling the C++ function. I
changed the ThreadCulture, but nothing changed.
I can't change the CultureInfo of the StreamWriter (it's a getter
property)! how can I solve my problem ?