Probably you need something like
auto gen = System::MakeObject< Aspose::BarCode::Generation::BarcodeGenerator>(EncodeTypes::Aztec);
gen->set_CodeText(u"Столица");
gen->get_Parameters()->get_Barcode()->get_Aztec()->set_CodeTextEncoding(System::Text::Encoding::get_UTF8());
gen->Save(“filename”, Aspose::BarCode::BarCodeImageFormat::Png);
You can convert strings from/to UTF8 with system functions
//UTF8 string. English string, can be any.
std::string utf8Str = “mystring”;
//convert from UTF8 to Aspose String
System::String asposeStr = System::String::FromUtf8(utf8Str.data());
//convert from Aspose String to UTF8
std::string utf8StrNew = asposeStr.ToUtf8String();
//result to console
std::wcout << asposeStr.ToWCS() << “\n”;
Thanks. I have a follow up question. How can I get HBITMAP (Bitmap handle) from a barcode bitmap stream?
Do you have any examples?
@deepakcs,
We are gathering information and will share our feedback soon.
Yes.
You need to:
- Convert Aspose bitmap stream to GDI+ Bitmap
- Extract HBITMAP from GDI+ Bitmap.
The same thing you can convert HBITMAP to Aspose Bitmap/Stream:
- Create GDI+ Bitmap from HBITMAP.
- Convert GDI+ Bitmap to Aspose Bitmap/Stream.
@deepakcs,
This is to inform you that we have fixed your issue now. We will incorporate the fix into next official release of the product (e.g Aspose.BarCode for C++ v21.3). You will be notified once the next release is published.
The issues you have found earlier (filed as BARCODECPP-410) have been fixed in this update. This message was posted using Bugs notification tool by eldaryakupov