cJSON parsing error using window utf-8 txt file, Remove UTF-8 BOM
게임을 만들자/C++
2015. 1. 8. 12:28
Sometime we get error from cJSON. Window utf-8 txt file attach big-endian information [EF BB BF]. It cause error when we parse json or use setcookie in PHP. I removed this information using Notepad++.Download Link : http://notepad-plus-plus.org/ 1. Save txt file to UTF-8 File->Save to other -> Set encoding to UTF-8 2. Using Notepad ++ Open txt file in Notepad++. Select UTF-8 without BOM
Android ndk, unicode to utf-8 or utf-8 to unicode
게임을 만들자/NDK & OpenGL ES
2015. 1. 7. 11:48
1. utf-8 to unicode I referenced below site http://en.wikipedia.org/wiki/UTF-8 wstring Utf8ToUnicode(const string& source_str) { int dest_len = 0; int source_len = source_str.length(); const char* source = source_str.c_str(); wchar_t* dest = new wchar_t[source_len]; wstring value; for (int i = 0; i