rdmenezes / rcf-cpp

Automatically exported from code.google.com/p/rcf-cpp
0 stars 0 forks source link

OTextStream is giving binary serialization #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the attached test program
2. Run it
3. Look at the generated file testfile_SF_text.txt that it is binary

What is the expected output? What do you see instead?
The file should be ASCII text.

What version of the product are you using? On what operating system?
1.1

Please provide any additional information below.

Compiled with:

RCF_COMPILE_LINE="-I $RCF_DIR/include -DRCF_USE_BOOST_ASIO
-DRCF_USE_OPENSSL -DRCF_USE_ZLIB -lboost_thread -lboost_system -lssl -lz
$RCF_DIR/libRCF_SF.o"
g++ -lboost_date_time $RCF_COMPILE_LINE test_text_serialization.cxx

Original issue reported on code.google.com by marius.k...@gmail.com on 29 Jul 2009 at 1:11

Attachments:

GoogleCodeExporter commented 9 years ago
OTextStream is named that way because it e.g. represents the number 255, as 
text 
('2, '5', and '5'), whereas OBinaryStream would represent it as binary 
(0xffffffff). 
However, the metadata that SF writes out, to describe what is serialized, are 
the 
same for both OTextStream and OBinaryStream, and uses binary values, not human 
readable characters.

So if you open the output file in a text editor, you should see the actual 
values 
you serialized in text, but in between them will be non-text characters.

Original comment by jarl.lin...@gmail.com on 30 Jul 2009 at 9:17

GoogleCodeExporter commented 9 years ago
Ah, I expected it to work like boost::archive::text_iarchive.

Anyway, I am successfully using boost serialization for both remote calling and
saving to file, so I am happy :)

Original comment by marius.k...@gmail.com on 30 Jul 2009 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by jarl.lin...@gmail.com on 6 Aug 2009 at 12:29