I want to serialize a string (Korean string) containing double byte characters. Do I need to do something special?
I am able to seria开发者_高级运维lize char *
strings by escaping special characters like \n,\b,\f,\t etc.
I am using C++ on Windows without any libraries.
You want to transform a Unicode string in bytes. An Unicode string can be represented in many ways in memory so you need to encode it. I
I recommend to use UTF-8
encoding for this because it the most used encoding it that is also independent of machine endianess.
精彩评论