login about faq


has anyone tried to use just CkString to convert unicode to BASE64? I tried this: CkString str_base64; str_base64.base64EncodeW(L"My data"); char* p_base64 = str_base64.getString();

But getting always an empty string. Thanks a lot for any hints.

asked Dec 05 '12 at 12:20

tkuprat's gravatar image


Make sure to read the reference documentation at http://www.chilkatsoft.com/refdoc/vcCkStringRef.html

void base64Encode(const char *charsetEncoding);

In-place base64 encodes the string. Internally, the string is first converted to the character encoding specified and then base-64 encoded. Typical charsetEncoding values are "utf-8", "ANSI", "iso-8859-1", etc.


answered Dec 05 '12 at 13:09

chilkat's gravatar image

chilkat ♦♦

Thanks a lot for the quick answer. I read the documentation. But I expected to input the text in right encoding as used by the string itself. It works now. But I still can't understand why to set the character encoding of the string stored in my ckstring object again. Thanks a lot for your help!

(Dec 06 '12 at 09:22) tkuprat
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 05 '12 at 12:20

Seen: 3,300 times

Last updated: Dec 06 '12 at 09:22

powered by OSQA